Spaces:
Running
title: Vibe Reader
emoji: ๐
colorFrom: pink
colorTo: purple
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
short_description: Describe your new favorite book through vibes
tags:
- mcp-in-action-track-creative
- anthropic
- nebius
- modal
- elevenlabs
๐ The Vibe Reader
Upload images that capture a mood. Get books that feel the same way.
The Vibe Reader is an AI-powered book recommendation engine that understands aesthetics, not just genres. Upload a mood board, a painting, a cozy photo, or any image that captures the feeling you want from your next readโand discover books that match that vibe.
๐ Built for the HuggingFace x Gradio MCP Hackathon
๐ฏ The Problem
Traditional book recommendations fail when you can't articulate what you want:
- "I want something that feels like a rainy afternoon in an old library" โ Good luck searching that on Goodreads
- Genre fatigue: You don't want "fantasy" or "romance"โyou want a specific feeling
- Visual inspiration: You found the perfect aesthetic on Pinterest but can't translate it to books
- Discovery paralysis: Too many options, no way to filter by vibe
โจ The Solution
The Vibe Reader bridges the gap between visual aesthetics and literary recommendations:
- ๐จ Upload Your Vibe โ Share 1-5 images that capture the mood you're seeking
- ๐ฎ AI Analysis โ Vision AI extracts aesthetic keywords, mood, themes, and tropes
- ๐ฌ Conversational Refinement โ Chat to fine-tune the vibe description
- ๐ Semantic Search โ Query a vector database of 50k+ book-vibe associations
- ๐ฏ Smart Narrowing โ Answer quick either/or questions to find your perfect match
- ๐ต Bonus: Vibe Soundtrack โ Get an AI-generated ambient track for your reading session
๐ The Dataset: Building a Vibe-to-Book Knowledge Base
A core contribution of this project is the data pipeline that transforms Reddit's r/BooksThatFeelLikeThis community into a structured, searchable recommendation dataset.
Data Collection Pipeline
Reddit Posts (1,500+ with images)
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. scrape_subreddit.py โ โ Reddit API (PRAW)
โ Collect posts + comments โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 2. extract_vibes.py โ โ Nebius VLM (Gemma 3 27B)
โ Analyze images โ vibe JSON โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 3. extract_books.py โ โ Anthropic LLM (Claude Haiku)
โ Parse comments โ book list โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 4. fetch_google_books.py โ โ Google Books API
โ Enrich with metadata โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 5. build_vector_index.py โ โ Nebius Embeddings (Qwen3-Embedding-8B)
โ Generate embeddings + FAISS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
Vector Store (Modal)
50k+ book-vibe associations
What Each Step Produces
| Step | Input | Output | AI Used |
|---|---|---|---|
| Scrape | r/BooksThatFeelLikeThis | Posts with images + nested comments | โ |
| Extract Vibes | Post images | Structured vibe JSON (aesthetics, mood, themes, tropes) | Nebius Gemma 3 27B |
| Extract Books | Comment threads | Book titles + authors | Nebius Qwen 3 30B |
| Fetch Metadata | Book list | Covers, descriptions, ISBNs, ratings | Google Books API |
| Build Index | Vibes + Books | FAISS vector index | Nebius Qwen3-Embedding-8B |
Vibe Data Structure
Each post is annotated with rich vibe metadata:
{
"aesthetic_genre_keywords": ["Dark Academia", "Gothic", "Victorian"],
"mood_atmosphere": ["Melancholic", "Mysterious", "Atmospheric"],
"core_themes": ["Isolation", "Obsession", "Hidden knowledge"],
"tropes": ["Unreliable narrator", "Secret society", "Forbidden library"],
"feels_like": "A haunting exploration of obsession set in the dusty halls of an ancient university, where every shadow holds secrets and the pursuit of knowledge comes at a terrible price..."
}
๐๏ธ Runtime Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Gradio UI โโโโโโถโ LangGraph Agent โโโโโโถโ Modal Vector โ
โ (Upload/Chat) โ โ (Orchestration) โ โ Store (FAISS) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Nebius VLM โ โ Google Books โ โ ElevenLabs โ
โ (Gemma 3 27B) โ โ MCP Server โ โ MCP Server โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Project Structure
vibe-reader/
โโโ app/ # Main application
โ โโโ app.py # Gradio interface
โ โโโ agent.py # LangGraph workflow with interrupts
โ โโโ prompts.py # LLM prompt templates
โ โโโ utils.py # Helper functions
โ โโโ custom.css # Styling
โโโ google_books_mcp_2/ # Google Books MCP server
โ โโโ app.py # Gradio MCP implementation
โโโ modal_app/ # Vector store deployment
โ โโโ build_vector_index.py # Index builder
โ โโโ vector_store.py # Modal serverless endpoint
โโโ scripts/ # Data pipeline
โ โโโ scrape_subreddit.py # Reddit data collection
โ โโโ extract_vibes.py # VLM vibe extraction
โ โโโ extract_books.py # LLM book extraction
โ โโโ fetch_google_books.py # Metadata enrichment
โ โโโ clean_vibes.py # Data cleaning
โโโ docs/ # Documentation
โโโ DATA_PIPELINE.md # Detailed pipeline guide
โโโ ARCHITECTURE.md # System design
โโโ AGENT_FLOW.md # LangGraph workflow
๐ MCP Server Integration
The Vibe Reader uses two MCP servers built with Gradio:
Google Books MCP Server
Provides book metadata enrichment via the Gradio MCP protocol:
- Search by title + author
- Retrieve covers, descriptions, ISBNs
- Deployed on Hugging Face Spaces
ElevenLabs MCP Server
Generates ambient soundtracks that match your reading vibe:
- AI-composed background music
- Mood-matched audio generation
- 30-second ambient tracks
โ๏ธ Configuration
Copy .env.example to .env and configure:
# Required: Nebius API for VLM + LLM + Embeddings
NEBIUS_API_KEY=your_key_here
# Required: Modal vector store URL
MODAL_VECTOR_STORE_URL=https://your-modal-app.modal.run/search
# Required: Google Books MCP
GOOGLE_BOOKS_MCP_URL=https://your-space.hf.space
# Optional: ElevenLabs for soundtracks
ELEVENLABS_API_KEY=your_key_here
---
## ๐ License
MIT License. See [LICENSE](LICENSE) for details.
---
## ๐ Acknowledgments
- **[r/BooksThatFeelLikeThis](https://reddit.com/r/BooksThatFeelLikeThis)** โ The incredible community whose posts power our dataset
- **[Gradio MCP Hackathon](https://gradio.app)**
- **[Nebius](https://nebius.com)** โ VLM, LLM, and embedding models for data annotation and runtime inference
- **[ElevenLabs](https://elevenlabs.io)** โ AI soundtrack generation
- **[Modal](https://modal.com)** โ Serverless vector store deployment
- **[Google Books API](https://developers.google.com/books)** โ Book metadata enrichment
---
Made with ๐ for the Gradio MCP Hackathon
*"Every book has a vibe. Now you can search by it."*