Open AI GPT-2 Tutorial | AI Text Generator

preview_player
Показать описание
In this quick tutorial we will download and install the Open AI GPT-2 Model and then generate a text based on some input. Basically we will use the Open AI model to build a basic AI Text generator. You can fine tune this for certain tasks like AI Generated Code, Music, Text and so on but in this example we will be generating text based on some input. Also keep in mind this is not some text from the training set or from a website, the AI generates it's own unique response.

In order to get Open AI GPT-2 up and running you need to download the model from the Github repository, install the requirements, download the models and run the sample. You can also fine tune the GPT-2 NLP for other categories in order to make it much more accurate.

If you want me to create an app around this or create a video where I am fine-tuning the model leave a comment down below. If enough people are interested I will create video about that!

For any thoughts, ideas, feedback or questions contact me at

Disclaimer:
All videos are for educational purposes and use them wisely. Any video might have inaccurate or outdated information. I give my best to research every topic thoroughly but please be aware that videos can contain mistakes.
Рекомендации по теме
Комментарии
Автор

Great tutorial 👌
Here are a few things you can fix if you are getting any errors on mac. (virtual env)

1. Make sure you are on Python 3.6 (exactly)
2. Make sure all dependencies are installed in the -requierment.txt provided. If not, install them using pip or conda install (name of the dependency) (you can also google exact versions given in the txt file.
3. Install Tensorflow 1.14.0 insted of 1.12.0 (git file needs to updated) (if you are getting sort error)
4. Make sure to use conda commands to install if in virtual env.

xvaruunx
Автор

If you would like to see some tutorial of how to create an app with this let me know in the comments 😁

noveltechmedia
Автор

yes would llove a tutorial of how to do backend on website! thankyou!

ENDLESSLIMITATIONS
Автор

Hi man, thanks for explaining how to work with this amazing AI!
I'll give you some feedback, and I hope you can improve on it: your screen is too large and the text ends up being too small on certain monitor sizes, and probably is impossible to read on mobile phones. Try to work on improving your readability overall, specially increasing your terminal font size somehow.
Other than that, great video. Got me subscribed!

RicardoFAlves-mpcb
Автор

No luck getting this working. Everything I tried resulted in errors and seems like there are lots of missing steps and details in this tutorial.

TheFearmoths
Автор

holy shit yes I absolutely would love to see you make a React UI for this! Does that mean you would be using javascript for the AI part, or would you be communicating with the python code somehow?

WeirdSide
Автор

I would be very interested in the full app tutorial! +1 for instructions on cloud hosting! Thanks brother!!!

j.hanleysmith
Автор

ModuleNotFoundError: No module named 'fire'

Please help

daweirdwaulrus
Автор

Anaconda decided to remove 3.6.0 from the available versions. How else can I get 3.6.0?

lexuscrow
Автор

hi, seem to be getting an error while trying to install the requirements it fails at the regex==2017.4.5 any ideas?

rayshadow
Автор

Nice video! I'd love to see how you can train the model by feeding it specific texts. This is something I'm interested in doing.

jald
Автор

Thank you for your video, it's super helpful and straightforward! I'm unfortunately still stuck getting this error:
AttributeError: module 'tensorflow' has no attribute 'sort'

I've installed tensorflow 1.8, and my python version is 3.6. Not sure what else I could be doing wrong at this point (tried googling around, but none of the solutions seemed to work for me). I'm not a coder by any means so maybe I'm missing something super obvious. Let me know if you think you know where I went wrong and thanks again!

Waziot
Автор

Any ideas what could be causing this?
python3 --top_k 40

Traceback (most recent call last):
File "C:\Users\Greg\Documents\gpt-2-test\src\interactive_conditional_samples.py", line 3, in <module>
import fire
ModuleNotFoundError: No module named 'fire'

TheCause
Автор

Is it possible to print text before the final print to see what GPT-2 is thinking actively?

I have to wait long sevrral minutes after the Model prom >>>
Is there a way to see what GPT-2 is thinking while it's processing the raw input 🤔?
Thanks

xvaruunx
Автор

Hi, thanks for the tutorial. The only thing is I am having some issues with TensorFlow -
[Import error- DLL load failed. The specified module could not be found. failed to load the native TensorFlow runtime]
paths are set properly. I don't know y I'm getting this.
Any help is appreciated.

Redknightly
Автор

Hey thanks for explaining so good!
I always have a problem to clone the git of gpt-2... When I put this "git clone" and the link, its always not working.
Maybe you can help....
Thank you !

miaterhorst
Автор

Why is the model consuming all my RAM instead of the CPU? Mine is an Intel Xeon E5-2695 CPU with 10Gb of RAM. My CPU usage stays low. Why?

krishnachaitanya
Автор

this thing will 100% eliminate the guys who only know HTML and CSS, hahaha

mengjunwang
Автор

Hi, so I don't have any experience in any of this so sorry if I sound dumb.

At first, I had problems getting Tensorflow 1.12 as it kept telling me the only ones available were 2.x. Had to go through a lot of tutorials, but did end up eventually getting it. However, now when I try and do the conditional samples, it says
(base) --top_k 40
Traceback (most recent call last):
File "src/interactive_conditional_samples.py", line 3, in <module>
import fire
ModuleNotFoundError: No module named 'fire'

MelonRamune
Автор

hey nices video can you tell me which version of tf you use exactly?

TheDailyNumber