vibe-reader / README.md
carolinacc's picture
Update README.md
8040ace verified

A newer version of the Gradio SDK is available: 6.0.2

Upgrade
metadata
title: Vibe Reader
emoji: ๐ŸŒ–
colorFrom: pink
colorTo: purple
video_url: >-
  https://drive.google.com/file/d/1jOWFS0rabZ5xz2cGjxOeH2aehER5vcDX/view?usp=drive_link
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
thumbnail: >-
  https://cdn-uploads.huggingface.co/production/uploads/68e96851533d31433431a2ec/ESKQKv-qfPO3p0XB8j4rf.webp

๐Ÿ“š The Vibe Reader

Demo video link: https://drive.google.com/file/d/1jOWFS0rabZ5xz2cGjxOeH2aehER5vcDX/view?usp=sharing

Social media post: https://x.com/notesfromcleo/status/1995278197840400619

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:

  1. ๐ŸŽจ Upload Your Vibe โ€” Share 1-5 images that capture the mood you're seeking
  2. ๐Ÿ”ฎ AI Analysis โ€” Vision AI extracts aesthetic keywords, mood, themes, and tropes
  3. ๐Ÿ’ฌ Conversational Refinement โ€” Chat to fine-tune the vibe description
  4. ๐Ÿ“š Semantic Search โ€” Query a vector database of 50k+ book-vibe associations
  5. ๐ŸŽฏ Smart Narrowing โ€” Answer quick either/or questions to find your perfect match
  6. ๐ŸŽต 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. 1

Data Collection Pipeline (not included in the Space)

Reddit Posts (1,500+ with images)
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  1. scrape_subreddit        โ”‚  โ† Reddit API (PRAW)
โ”‚     Collect posts + comments    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  2. extract_vibes           โ”‚  โ† Nebius VLM (Gemma 3 27B)
โ”‚     Analyze images โ†’ vibe JSON  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  3. extract_books           โ”‚  โ† Anthropic LLM (Claude Haiku)
โ”‚     Parse comments โ†’ book list  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  4. fetch_google_books      โ”‚  โ† Google Books API
โ”‚     Enrich with metadata        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  5. build_vector_index      โ”‚  โ† 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 Anthropic Claude Haiku 4.5
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     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”Œ MCP Server Integration

The Vibe Reader uses one MCP server 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

Other integrations

ElevenLabs API

Generates ambient soundtracks that match your reading vibe:

  • AI-composed background music
  • Mood-matched audio generation
  • 1min30-second ambient tracks

โš™๏ธ Configuration

Required variables if you want to run this elsewhere:

# 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 for details.


๐Ÿ™ Acknowledgments


Made with ๐Ÿ“š for the Gradio MCP Hackathon

"Every book has a vibe. Now you can search by it."