explainor / README.md
Emperor555's picture
Initial commit: Explainor - AI agent with persona voices
074e8ce
|
raw
history blame
3.61 kB

🎭 Explainor

Learn anything through the voice of your favorite characters!

MCP Hackathon Track Category

Tags: mcp-in-action-track-creative


🌟 What is Explainor?

Explainor is an AI agent that takes any topic you want to learn about and explains it through the voice of fun characters! Choose from 6 unique personas:

Persona Style
πŸ‘Ά 5-Year-Old Simple words, excited, curious questions
πŸ‘¨β€πŸ³ Gordon Ramsay Intense, food metaphors, "It's RAW!"
πŸ΄β€β˜ οΈ Pirate "Arrr!", treasure metaphors, swashbuckling
🎭 Shakespeare Dramatic, old English, theatrical
πŸ„ Surfer Dude "Brooo", chill vibes, wave metaphors
πŸ§™ Yoda Inverted syntax, wise, Force references

🎬 Demo

[Demo Video Placeholder]

πŸ› οΈ How It Works

  1. Enter a topic - Anything from "Quantum Computing" to "How do volcanoes work?"
  2. Choose a persona - Pick your favorite character
  3. Watch the magic - The AI agent:
    • πŸ” Researches your topic using web search
    • 🧠 Shows its reasoning process
    • ✍️ Transforms the explanation into the character's voice
    • πŸ”Š Reads it aloud with a matching voice!

πŸš€ Tech Stack

  • LLM: Nebius AI - Llama 3.3 70B for intelligent explanations
  • TTS: ElevenLabs - Realistic voice synthesis with character-matched voices
  • Web Search: DuckDuckGo API for topic research
  • Frontend: Gradio - Beautiful, responsive UI
  • Deployment: Modal - Serverless infrastructure

πŸ’» Local Development

Prerequisites

  • Python 3.11+
  • Nebius API key
  • ElevenLabs API key

Setup

# Clone the repository
git clone https://huggingface.co/spaces/MCP-1st-Birthday/explainor

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys

# Run locally
python app.py

Environment Variables

NEBIUS_API_KEY=your_nebius_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here

🌐 Deployment

Modal Deployment

# Set up Modal secrets
modal secret create nebius-api-key NEBIUS_API_KEY=your_key
modal secret create elevenlabs-api-key ELEVENLABS_API_KEY=your_key

# Deploy
modal deploy modal_app.py

Hugging Face Spaces

This app is designed to run on Hugging Face Spaces with the Gradio SDK.

πŸ“ Project Structure

explainor/
β”œβ”€β”€ app.py              # Main Gradio application
β”œβ”€β”€ modal_app.py        # Modal deployment config
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ personas.py     # Persona definitions & voice mappings
β”‚   β”œβ”€β”€ agent.py        # Agent logic & web search
β”‚   └── tts.py          # ElevenLabs integration
└── README.md

πŸ† Hackathon Submission

  • Event: MCP's 1st Birthday Hackathon
  • Track: MCP in Action (Track 2)
  • Category: Creative
  • Team: kaiser-data
  • Sponsor Integration: ElevenLabs for text-to-speech

πŸ“ License

MIT License - Feel free to use and modify!


Made with ❀️ for MCP's 1st Birthday Hackathon