WE'RE LIVE! ersatzspaghetti.space, this is also our domain.com entry!


According to Urban Dictionary, a copypasta can be defined as "A block of lengthy text repeatedly copy-pasted in an online forum or chat room" or when used on popular streaming site twitch.tv, "Lengthy text that is mindlessly copy-pasted repeatedly in Twitch Chat, often to make fun of something through satire and repetition". As ardent copypasta connoisseurs, we have concluded that it is our moral duty to share our love for terrible textposts with the masses. However, we have only so much time in a weekend, so why not get our computers to do the hard work for us?

That's why we've created ersatzspaghetti (ersatz meaning fake or not genuine and spaghetti being the Italian word for spaghetti) to take as many copypasta as we could find and use _ DEEP LEARNING _ to create more for the world to enjoy at their leisure, instead of having to venture into fast-moving and frequently toxic chat rooms on popular twitch.tv steams. These copypasta can than be saved, and we've even added on built in text to speech so you can hear and save amusing accompaniments to our wonderful words.

What it does

ersatzspaghetti is an app that allows you to generate brand new copypasta on demand using textgenrnn for python3 with the help of a copypasta scraper to make data collection easier. Our specially trained model spits out custom copypasta faster than you can say 'omegalul', and only requires one click to do it! Once the copypasta is loaded, we also used Google Cloud's Text to Speech API to generate an audio clip of your precious pasta being read aloud, which usually is quite amusing.

How we built it

ersatzspaghetti runs on a python3 Flask server we've deployed to Heroku and hooked up our domain.com domain (ersatzspaghetti.space) to. The Flask server uses our textgenrnn model to generate copypastas when the button on the main page is clicked. Then the generated text is sent to Google Cloud's Text to Speech API which saves a recording of the text being said and is given to the user in the form of an audio player embedded in the webpage. On the back end, our UiPath implementation monitors server activity and checks if the app ever crashes, and when it does it emails us with an image of the error, since the robot we created will be monitoring and refreshing the page to check for crashes or errors.

Challenges we ran into

-Adding GCP json credentials to Heroku as an environment variable was WAY harder than it needed to be (can't push credentials publicly since they'll get scraped and used for bitcoin mining and then GCP suspends the credentials) - it certainly didn't help that I couldn't get the Heroku CLI working on my WSL Ubuntu shell and gunicorn (which Heroku uses to run the app) only works in Unix-like systems (so not PowerShell).

-We had to switch models on Day 2 after our best efforts after using the first one were garbled nonsense (like "minal this mofter seep has own you say it that mouso show pompelt a elgating looked the wadian has to the fevimup that a subhing apponerifade ary mech arate at ofter to this anial hand much the marse subscrobm spams" for example)

-HTML was as fiddly and annoying to use as it usually is :)

Accomplishments that we're proud of

-Getting Heroku to accept the gosh darn GCP json credentials

-Being comfortable enough with tensorflow/keras to set up the model without too much trouble

What we learned

-Avoid json credentials AT ALL COSTS

-Text takes longer to generate with machine learning than images (at least in the cases we've used them) which is a bit odd seeming to us

What's next for ersatzspaghetti

-Improve quality of emotes, and generate more kinds of internet fun things

-Make UiPath generate quotes and add it to our file

-Make better quotes by experimenting more with machine learning

-Make front end mobile friendly

Built With

Share this project: