Spaces:
Running
Running
| """ | |
| Reachy Recognizer - Hugging Face Space App | |
| This is a placeholder app that provides information about the Reachy Recognizer | |
| and enables one-click installation to Reachy Mini robots. | |
| """ | |
| import gradio as gr | |
| def create_interface(): | |
| """Create the Gradio interface.""" | |
| with gr.Blocks(title="Reachy Recognizer", theme=gr.themes.Soft()) as demo: | |
| gr.Markdown( | |
| """ | |
| # π€ Reachy Recognizer | |
| **Human-Aware AI Companion for Reachy Mini** | |
| A complete face recognition and conversational AI system that enables Reachy Mini | |
| to recognize people, greet them with personalized responses, and engage in natural | |
| voice conversations. | |
| """ | |
| ) | |
| with gr.Row(): | |
| with gr.Column(): | |
| gr.Markdown( | |
| """ | |
| ## β¨ Features | |
| - **Face Recognition**: Real-time face detection and recognition | |
| - **Personalized Greetings**: Context-aware greetings based on person and time | |
| - **Voice Conversation**: Natural language conversations with OpenAI GPT | |
| - **Adaptive Behaviors**: Dynamic robot movements and expressions | |
| - **Event System**: Smart debouncing and state management | |
| """ | |
| ) | |
| with gr.Column(): | |
| gr.Markdown( | |
| """ | |
| ## π Installation | |
| ### To Reachy Robot | |
| 1. Make sure your Reachy Mini is running | |
| 2. Navigate to your Reachy dashboard (typically `http://localhost:8000`) | |
| 3. Use the installation button below | |
| ### Manual Installation | |
| ```bash | |
| git clone https://github.com/chelleboyer/reachy-recognizer.git | |
| cd reachy-recognizer | |
| pip install -e . | |
| ``` | |
| """ | |
| ) | |
| gr.Markdown("---") | |
| with gr.Row(): | |
| dashboard_url = gr.Textbox( | |
| label="Reachy Dashboard URL", | |
| value="http://localhost:8000", | |
| placeholder="http://localhost:8000" | |
| ) | |
| with gr.Row(): | |
| install_btn = gr.Button("π₯ Install to Reachy", variant="primary", size="lg") | |
| status_box = gr.Textbox(label="Status", interactive=False) | |
| def install_to_reachy(url): | |
| """Simulate installation (actual installation happens via API).""" | |
| import requests | |
| try: | |
| response = requests.post( | |
| f"{url}/api/install", | |
| json={ | |
| "url": "https://github.com/chelleboyer/reachy-recognizer", | |
| "name": "reachy_recognizer" | |
| }, | |
| timeout=10 | |
| ) | |
| if response.ok: | |
| return "β Installation started! Check your Reachy dashboard." | |
| else: | |
| return f"β Installation failed: {response.text}" | |
| except Exception as e: | |
| return f"β Error connecting to Reachy: {str(e)}" | |
| install_btn.click( | |
| fn=install_to_reachy, | |
| inputs=[dashboard_url], | |
| outputs=[status_box] | |
| ) | |
| gr.Markdown("---") | |
| with gr.Accordion("π About the Project", open=False): | |
| gr.Markdown( | |
| """ | |
| ## System Architecture | |
| The Reachy Recognizer is built with a modular architecture: | |
| - **Vision System**: Face detection, encoding, and recognition | |
| - **Event System**: Debounced event handling for recognition state changes | |
| - **Behavior System**: Robot movements, gestures, and idle behaviors | |
| - **Voice System**: Text-to-speech with adaptive voice selection | |
| - **Conversation System**: Speech-to-text and LLM integration | |
| - **Coordination**: Centralized greeting and interaction management | |
| ## Performance | |
| - **Recognition Speed**: β₯5 FPS real-time processing | |
| - **Detection Accuracy**: >95% with OpenCV DNN | |
| - **Recognition Accuracy**: >90% with SFace embeddings | |
| - **Latency**: <200ms end-to-end greeting response | |
| ## Requirements | |
| - Python β₯3.12 | |
| - Reachy Mini robot or simulator | |
| - OpenCV with DNN module | |
| - OpenAI API key (for conversations) | |
| ## License | |
| MIT License - See [GitHub repository](https://github.com/chelleboyer/reachy-recognizer) | |
| """ | |
| ) | |
| with gr.Accordion("π Links", open=False): | |
| gr.Markdown( | |
| """ | |
| - [GitHub Repository](https://github.com/chelleboyer/reachy-recognizer) | |
| - [Documentation](https://github.com/chelleboyer/reachy-recognizer/tree/main/docs) | |
| - [Project Structure](https://github.com/chelleboyer/reachy-recognizer/blob/main/docs/PROJECT_STRUCTURE.md) | |
| - [Configuration Guide](https://github.com/chelleboyer/reachy-recognizer/blob/main/docs/CONFIGURATION.md) | |
| """ | |
| ) | |
| return demo | |
| if __name__ == "__main__": | |
| demo = create_interface() | |
| demo.launch() | |