Spaces:
Sleeping
Sleeping
| """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!* | |
|  | |
| """) | |
| 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() | |