"""Hugging Face Spaces entry point for Reachy Mini Conversation App. This Space serves as documentation and installation hub for the Reachy Mini Conversation App - a voice-activated coding assistant for the Reachy Mini robot. """ import gradio as gr DESCRIPTION = """ # 🎨 Reachy the Vibe Coder **Voice-activated coding with Reachy Mini!** Tell Reachy what to build, and watch it come to life in Cursor IDE. > "Reachy, build me a website" → Reachy decides the colors, layout, animations, everything, and codes it for you! ## 🚀 Quick Install ```bash pip install git+https://huggingface.co/spaces/robertkeus/reachy-vibe-coder ``` ## 📋 Requirements - Python 3.10+ - [Reachy Mini SDK](https://github.com/pollen-robotics/reachy_mini/) installed - OpenAI API key (for realtime conversation) - Reachy Mini robot (hardware or simulator) ## 🎮 Running the App ```bash # Activate your environment source .venv/bin/activate # Run with Gradio UI reachy-vibe-coder --gradio # Run with face tracking reachy-vibe-coder --head-tracker mediapipe # Audio only (no camera) reachy-vibe-coder --no-camera ``` ## ✨ Features | Tool | Description | |------|-------------| | `vibe_code` | 🎨 Tell Reachy to build something - it decides ALL the details! | | `vibe_big_project` | 🚀 For epic builds using Cursor's Agent mode | | `dance` | 💃 Queue choreographed dances | | `play_emotion` | 😊 Play recorded emotion clips | | `camera` | 📷 Capture and analyze camera frames | | `head_tracking` | 👀 Enable/disable face tracking | ## 🏗️ Architecture The app combines: - **OpenAI Realtime API** for voice conversation - **FastRTC** for low-latency audio streaming - **Gradio** for the web interface - **Reachy Mini SDK** for robot control - **Cursor IDE integration** for vibe coding --- *This Space provides installation and documentation. The actual app runs locally with your Reachy Mini robot.* """ INSTALL_INSTRUCTIONS = """ ## 📦 Installation Methods ### Using uv (recommended) ```bash git clone https://huggingface.co/spaces/robertkeus/reachy-vibe-coder cd reachy-vibe-coder uv venv --python 3.12.1 source .venv/bin/activate uv sync ``` ### Using pip ```bash git clone https://huggingface.co/spaces/robertkeus/reachy-vibe-coder cd reachy-vibe-coder python -m venv .venv source .venv/bin/activate pip install -e . ``` ### Optional Dependencies ```bash # Wireless Reachy Mini support pip install -e .[reachy_mini_wireless] # Vision options pip install -e .[local_vision] # PyTorch/Transformers pip install -e .[yolo_vision] # YOLO tracking pip install -e .[mediapipe_vision] # MediaPipe pip install -e .[all_vision] # Everything ``` ## ⚙️ Configuration 1. Copy `.env.example` to `.env` 2. Add your OpenAI API key: ```env OPENAI_API_KEY=your-key-here ``` ## 🔧 Troubleshooting **Timeout error?** Make sure the Reachy Mini daemon is running: ```bash # Install and start the SDK first # See: https://github.com/pollen-robotics/reachy_mini/ ``` """ def create_demo(): """Create the Gradio demo interface.""" with gr.Blocks( title="Reachy the Vibe Coder", theme=gr.themes.Soft( primary_hue="blue", secondary_hue="purple", ), css=""" .main-header { background: linear-gradient(135deg, #00d4aa 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .install-box { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border-radius: 12px; padding: 20px; } footer { visibility: hidden; } """ ) as demo: gr.Markdown(DESCRIPTION) with gr.Accordion("📦 Detailed Installation Guide", open=False): gr.Markdown(INSTALL_INSTRUCTIONS) with gr.Accordion("🎬 Demo Video", open=False): gr.Markdown(""" *Coming soon: Video demonstration of Reachy the Vibe Coder in action!* ![Reachy Mini Dance](https://raw.githubusercontent.com/pollen-robotics/reachy_mini/main/docs/assets/reachy_mini_dance.gif) """) with gr.Row(): gr.Markdown(""" ### 🔗 Links - [Reachy Mini SDK](https://github.com/pollen-robotics/reachy_mini/) - [Pollen Robotics](https://www.pollen-robotics.com/) """) gr.Markdown(""" ### 📄 License Apache 2.0 Made with ❤️ by Robert Keus """) return demo if __name__ == "__main__": demo = create_demo() demo.launch()