As a side project, I used the GPT-2 OpenAI NLG model and trained it on Donald Trump speeches. You can type a sentence and it will generate a few paragraphs that sound like Trump completing the thought.
I used https://github.com/minimaxir/gpt-2-simple and some other stuff to re-train, with Starlette being the python web server. I'll write up a blog post later on what I learned and issues I faced.
The text generation is pretty slow right now (~20 secs), but I didn't optimize anything since this was just a fun side project. Would love thoughts/feedbacks/funny texts :-)
You may want to consider separating the UI from the Cloud Run container since it'll show nothing until the container cold starts, which is why I do that workflow in the repo.
“ Dude where is my car. What do you need it for? Where are the employees? This is a man who's got a wife and a beautiful home. And he's going to be president. OK. He's going to be president ”
7 comments
[ 186 ms ] story [ 550 ms ] threadAs a side project, I used the GPT-2 OpenAI NLG model and trained it on Donald Trump speeches. You can type a sentence and it will generate a few paragraphs that sound like Trump completing the thought.
I used https://github.com/minimaxir/gpt-2-simple and some other stuff to re-train, with Starlette being the python web server. I'll write up a blog post later on what I learned and issues I faced.
The text generation is pretty slow right now (~20 secs), but I didn't optimize anything since this was just a fun side project. Would love thoughts/feedbacks/funny texts :-)