Spaces:
Runtime error
Runtime error
File size: 4,797 Bytes
f7c0a2b c01276e f7c0a2b c01276e f7c0a2b c01276e f7c0a2b a9ef42f f7c0a2b a9ef42f f7c0a2b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | """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()
|