In the first two blogs, we built a strong foundation:
Blog 1: Dataset setup, baseline recommendations, and SVD-based personalization.
Blog 2: Two-Tower Neural Network to handle cold start and richer user/item embeddings.
Now, it’s time to showcase our project in action. In this final post, we’ll see how to wrap everything in a live interactive app, explore the models, and understand their results in real-time.
Running the Recommender in Google Colab with Streamlit
So far, our experiments have been inside notebooks. That’s great for exploration, but what if we want to share the results with others?
This is where Streamlit comes in. It lets us take our trained models and put them behind a clean, interactive UI. And the best part? We don’t even need to host it on a server — we can demo it directly from Google Colab.
Here’s the YouTube demo video where I walk through the complete project:
Step 1: Setting Up Dependencies
First, we install the required packages:
!pip install streamlit pyngrok cloudflared
Streamlit → for building the app
Cloudflared → to expose the app to the internet
Pyngrok (optional) → another tunnelling option
Step 2: Building the Streamlit App
Our app (app.py) has three main sections:
Popular Movies
A simple baseline list of trending films.
Helps us compare against advanced recommenders.
User-to-Movie Recommendations
SVD-based Collaborative Filtering: personalized recs based on user history.
Two-Tower Model: handles cold start by using user & movie embeddings.
Movie-to-Movie Similarity
Enter a movie title → find similar films.
We compare SVD latent vectors vs Two-Tower embeddings side by side.
Click to see code for this step and watch detailed demo.
Step 3: Exposing the App with Cloudflare Tunnel
Normally, Streamlit runs on a local port (8501) inside Colab, which isn’t accessible outside. To solve this, we use Cloudflare Tunnel:
!streamlit run app.py & npx cloudflared tunnel --url http://localhost:8501
This instantly gives a public HTTPS link that you can share with anyone. No servers, no complex deployment, just one command.
Key benefit: No need to run heavy models on your laptop or deploy on cloud infrastructure. Everything runs in Colab, yet feels like a live hosted app.
Why This Matters
With this final step, we’ve:
Bridged research and product → moving from notebook outputs to a real interactive app.
Compared approaches → showing how SVD and Two-Tower perform side by side.
Made it accessible → thanks to Cloudflare Tunnel, anyone can try it without setup.
Wrapping Up
This final part of the series. Here is a quick glimpse of our journey so far raw data → baseline models → hybrid recommendation system → live demo app.
Now you can:
Explore the recommendations interactively
Share your app with others instantly
Build on top of this to deploy on real infrastructure later
Where We Are (Progress Table)
Step | Description | Status |
|---|---|---|
1 | Vision & Dataset Setup | ✅ |
2 | Baseline Recommenders | ✅ |
3 | Collaborative Filtering (SVD) | ✅ |
4 | Two-Tower Neural Model | ✅ |
5 | Test + API Integration | ✅ |
6 | UI + Deployment + Wrap-up | ✅ |
All code for this post is in the Colab notebook: link
More from the Author
📝 Blog: https://blog.slayitcoder.in
📬 Newsletter: https://slayitcoder.substack.com
💼 LinkedIn: Pushkar Singh
