""" Reachy Mini Simple Control Panel - Static File Server for HuggingFace Spaces Serves the static HTML/JS control panel that uses WebSockets to connect to localhost:8000 """ import gradio as gr from pathlib import Path # Get the directory where this file is located BASE_DIR = Path(__file__).parent # Read the HTML file html_path = BASE_DIR / "index.html" js_path = BASE_DIR / "app.js" with open(html_path, 'r') as f: html_content = f.read() with open(js_path, 'r') as f: js_content = f.read() # Inject JavaScript directly into HTML full_html = html_content.replace( '', f'' ) # Create Gradio app with just the HTML with gr.Blocks(title="Reachy Mini Simple Control Panel") as app: gr.HTML(full_html) if __name__ == "__main__": app.launch( server_name="0.0.0.0", server_port=7860, share=False )