Skip to content

Show HN: Trump to Text (Natural Language Generation)

trumptotext.com
9 pointsBlackJack7 comments
On HN

Comments

“ 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 ”

Hey HN!

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.

Hey thx for sharing this. Would you mind sharing some details about deployment and cost? Would be very helpful?

"I am a crossbreed of an Oompa Loompa and a potato."

"When will our song and dance of life reach a beautiful crescendo?"

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.