In Built With Clarifai

Clarifai Featured Hack: Pocket Hipster, Because You Thought It Was Cool Before Everyone Else

By Team Clarifai

Pocket Hipster is a cheeky and hilarious app that generates hipster poetry for every image you feed it. Just put on your Warby Parkers, get a piping hot mug of free-range, farm-to-table, gluten-free, fairtrade coffee, and enjoy!


Pocket Hipster is one of those apps that will have you alternating between fits of giggles and existential ennui. How, you might ask? Upload any image and Pocket Hipster will spit out some lines of (usually non-sensical but always hilarious) prose worthy of the hippest hipster that’s ever hipped. You can try the app live here!

 

 

With the help of some works from Edgar Allen Poe and Sigmund Freud, as well as the ever-entertaining posts under Tumblr’s #poetry, the Pocket Hipster team was able to build this brilliant app using something called Markov chains and the Clarifai API.


WHY WE ❤ IT
Obviously, Pocket Hipster is a post-modernist masterpiece with a healthy infusion of sarcasm and wit. We love it because it showcases a creative application of our API while also demonstrating some great technical chops.

HOW YOU DO IT
We caught up with the masterminds of Pocket Hipster – Jordan Hand, Logan Girvin, Katrina Ezis, and Oliver Stanley (all undergrads from the University of Washington Seattle) – to talk about what inspired them to make this #fetch (stop trying to make “fetch” happen, it’s not going to happen) app.


Clarifai: What inspired your idea for Pocket Hipster?
Pocket Hipster Team: At DubHacks 2015, Microsoft’s James Whittaker started his keynote talk by telling us all that we’re essentially worthless. He went on to talk about the value of sarcasm, creativity, and specific expertise, emphasizing the value of “making epic shit.” We decided to make something cheeky rather than academic or practical and started brainstorming. Ultimately, we came up with something you can pull out to make you seem much deeper than you actually are – a pocket-sized hipster.
We saw the Clarifai API and realized the possibilities were endless.


C: How did you build such an ingenious thing?
P: Our web app takes a user-uploaded image and produces free verse poetry using a Markov chain generator trained on Sigmund Freud’s “Dream Psychology: Psychoanalysis for Beginners”, volumes 1 and 2 of Widger and Traverso’s “The Works of Edgar Allen Poe”, and 2000 Tumblr text posts which had been tagged with ‘poetry’. Tags related to the user’s image are used to seed each line of the poem, sorted in descending order of the algorithm’s confidence, resulting in increasingly abstract lines.
We built the site on a Node server coupled with Express to write a custom REST API to handle poem generation. In order to prevent our website from looking too mainstream we used jQuery and Bootstrap to create a simple and sufficiently aesthetical UI. This was on top of the usual HTML, CSS, and JavaScript that goes into any dynamic web application. Our text aggregation and interaction with the Tumblr API.
The most difficult components were creating a Markov chain generator we were happy with and getting our data back from the site through Clarifai to the generator and back to the user.


C: On a scale of “mild hipster ennui” to “extreme hipster apathy,” how much did you enjoy working with the Clarifai API?
P: Despite our best efforts to immerse ourselves in hipsterish apathy, we had a ton of fun making this application.
Working with the Clarifai API and getting all of the pieces of our project to line up and interface correctly was a challenge. Getting to bother Cassidy with questions during the hackathon was a big help, as were her inspiring lip sync skills. We’re still a little shocked that we not only produced a functioning website, but went on to take third place out of over one-hundred teams and win Clarifai’s sponsor prize despite our inexperience.
Attending DubHacks was an amazing introduction to the world of hackathons and we are so grateful to Clarifai for helping to make it happen.


Thanks for sharing, hipsters!
To learn more, check out our documentation and sign-up for a free Clarifai account to start using our API – all it takes is three lines of code to get up and running! We’re super excited to share all the cool things built by our developer community, so don’t forget to tweet @Clarifai to show us your apps.

Previous Next