Generate Text using OpenAIGPT2 in Python
HTML-код
- Опубликовано: 1 окт 2024
- Generate Text using OpenAIGPT2 using Python Pytorch.
Code used in Video (Taken from huggingface):
git clone github.com/gra...
curl --output gpt2-pytorch_model.bin s3.amazonaws.c...
pip install -r requirements.txt
python main.py --text "We are living in information age. "
awesome video. thanks. i hope i can get tutorial to train new text.
Could you just share this Google Colab?
Very informative, I have one question, I fine tuned BERT for squad dataset, is it possible to further finetune it on my own QA dataset? Also need help on inference side of squad, there are lots of examples on text classification using Bert but not on squad
For retraining, put your data in train.json
Can you elaborate inference question
Practical Matter yes, on inference side, if I have one text box (flask route) that contains paragraph(context) and one question related to that paragraph then it gives me output as an answer but, I want to make it like chatbot, means I don’t want to paste context paragraph every time, also can you suggest solution for my second comment? There are many people who formed HuggingFace’s implementation for fine tuning but I don’t know which one is best
Context has to be there.. As network parses question and context together to pay attention.
Whats the second Comment you are referring to?
Practical Matter okay! Thanks for info:)
beautiful
Also how to retrain gpt2 on new text?
Thanks
Hello, thank you for the video, is there a way i can use it in another language, I couldn't see English being chosen in main.py as well so it must be default, any suggestions?
This is an old code.. Now get latest code from main website, there you may get option to chose other language model
is it possible to train it to rewrite text ?
3:35 Am... Does model trying to tell us something?
In this video it is generating text based on learning... Are you pointing to some specific question?
Though it is saying we need to manage our time well and learn new things as we are surrounded by so many new state of art models :)
@@SandeepBhutani No no no.. I pretty clearly see that is saying that it's going to kill us all.
Where are you stuck..
Alright so I'm inexperienced and when I tried finally running the last command to print the text it gave me the error "no module named 'torch'" any ideas about what I missed?
You need to install pytorch
@@SandeepBhutani I figured that out and just decided to use Google Drive instead of trying to download everything on windows. Much easier
Great