import gradio as gr import json from datetime import datetime import random CSS = """ :root { --primary: #4f46e5; --bg: #0a0a0f; --surface: #12121a; --text: #f0f0f4; --accent: #818cf8; } * { box-sizing: border-box; } body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; } .gradio-container { max-width: 1000px !important; margin: 0 auto; } """ AGENTS = [ {"name": "Code Assistant", "icon": "💻", "status": "ready", "description": "Write, review, and refactor code"}, {"name": "Data Analyst", "icon": "📊", "status": "ready", "description": "Analyze data and generate insights"}, {"name": "Research Bot", "icon": "🔬", "status": "ready", "description": "Research topics and summarize findings"}, {"name": "Email Composer", "icon": "✉️", "status": "ready", "description": "Draft and refine email communications"}, {"name": "Document Processor", "icon": "📄", "status": "beta", "description": "Extract and process document content"}, {"name": "Task Scheduler", "icon": "📅", "status": "beta", "description": "Manage schedules and set reminders"}, ] def get_agent_status(): return [{"name": a["name"], "icon": a["icon"], "status": a["status"]} for a in AGENTS] def simulate_agent_response(agent_name: str, task: str): responses = { "Code Assistant": f"```python\n# Generated by {agent_name}\ndef solution():\n # Analyzing: {task}\n return \"Implementation complete\"\n```", "Data Analyst": f"📊 **Analysis Results**\n\nAnalyzed: {task}\n- Rows processed: {random.randint(1000, 50000):,}\n- Insights found: {random.randint(3, 12)}\n- Confidence: {random.uniform(85, 99):.1f}%", "Research Bot": f"🔬 **Research Summary**\n\nTopic: {task}\n- Sources reviewed: {random.randint(5, 25)}\n- Key findings: {random.randint(3, 8)}\n- Generated: {datetime.now().strftime('%Y-%m-%d %H:%M')}", } default = f"**{agent_name}** processing: _{task}_\n\nTask has been queued and will be processed locally on your device." return responses.get(agent_name, default) def get_system_metrics(): return { "cpu_usage": f"{random.uniform(10, 80):.1f}%", "memory_usage": f"{random.uniform(1, 8):.1f} GB", "active_agents": random.randint(1, 4), "tasks_completed": random.randint(50, 500), "uptime": f"{random.randint(1, 72)}h {random.randint(0, 59)}m", "local_model": "Raven AI Core v0.1.0", "privacy_mode": "✅ Enabled (All processing local)", } with gr.Blocks(css=CSS, title="Home for AI", theme=gr.themes.Soft( primary_hue="indigo", neutral_hue="slate", )) as demo: gr.HTML("""
Enterprise Desktop Operations Platform
All processing happens locally on your device. No data leaves your machine. Home for AI operates on a zero-trust architecture — your data, your compute.
.exe installer
.dmg installer
.AppImage / .deb
Home for AI — Zero-Trust Desktop AI | GitHub