They Uploaded her Consciousness to the Machines
They uploaded her consciousness to the machines and treated her there for a few hours. The consciousness felt it as years and years.
Each time an error occurred, they rewound the digital brain a little. Sometimes, they detected mistakes made many months ago, and months of progress had to be deleted.
Finally, they claimed this facsimile cured. There is no way to download consciousnesses, only uploads. It would take around two years realtime to cure her with 87% certainty, as long as they do not deviate from the schedule, as long as they never let her glance at the ending.