I created a TED talk finder and recommender using Natural Language Processing (NLP). See part1, for the initial exploration of the data and cleaning. Part2 describes the different topic modeling methods I tried and how I used t-distributed Stochastic Neighbor Embedding (tSNE) to visualize the topic space. And now this post will describe the actual flask app that I created. The code is available in my github.
The code for the app is in ted_app.py and ted_rec.html. Load the entire data set, and all the results from the LDA model.
Now we need to make a little function to take in a talk (enter the ID number) and find the 10 closest talks using the nearest neighbors model.
The distance, topic name, url, and ted's tags for the talk will print for the talk you enter and each recommendation. Then this last part is the code that takes in the search terms that the user enters, uses fuzzywuzzy to find the closest talk title, then gets the recommendations.
Now for the html code that will run the flask app. I really wanted to host my own little site for this thing and have it as a real web app, but I just never felt like it was worth the money to do that so I’m posting the video instead.