gpt-2-simple icon indicating copy to clipboard operation
gpt-2-simple copied to clipboard

How to use Colab notebook for my web app?

Open yashika51 opened this issue 4 years ago • 4 comments

Hi, I fine-tuned the gpt-2-simple model on the custom text and got really good results. The checkpoints got saved in my drive and it was a 500 MB file.

I have a web app with backend built on node.js, I want the output given by my model to be used by backend. Is there any way to do that? I tried to find ways to access drive locally so that I could access the checkpoints but couldn't.

Any suggestions would be helpful. Thank you so much.

yashika51 avatar Oct 28 '20 20:10 yashika51

I cannot help on the web app part. But I managed to point to a locally saved model. See this script: https://github.com/rbewoor/Misc/blob/master/GPT2_Inf_Trained_Model_For_Github.ipynb

Took the barebones functionality from the gpt_2.py script of minimaxir. Hope it helps. Any improvements do lemme know please.

rbewoor avatar Oct 29 '20 09:10 rbewoor

Hi @rbewoor! Did you use the checkpoints available in the repository?

yashika51 avatar Oct 29 '20 20:10 yashika51

Started by downloading the pre-trained 355M model, fine tuned, saved checkpoint locally. Then my script points to this local directory for inference.

rbewoor avatar Oct 30 '20 08:10 rbewoor

okay thanks @rbewoor!

yashika51 avatar Oct 31 '20 18:10 yashika51