Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Cosmic Reactor β Control Hub | |
| Status page + redirect to VPS-hosted Agent Zero | |
| """ | |
| import gradio as gr | |
| HTML_CONTENT = """ | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Cosmic Reactor</title> | |
| <style> | |
| * { margin: 0; padding: 0; box-sizing: border-box; } | |
| body { | |
| background: #0a0a18; | |
| color: #e0d0ff; | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; | |
| display: flex; justify-content: center; align-items: center; | |
| min-height: 100vh; | |
| } | |
| .container { | |
| text-align: center; | |
| padding: 2rem; | |
| max-width: 800px; | |
| } | |
| h1 { | |
| font-size: 2.5rem; | |
| background: linear-gradient(135deg, #b388ff, #00bcd4); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| margin-bottom: 0.5rem; | |
| } | |
| .subtitle { color: #888; margin-bottom: 2rem; font-size: 1.1rem; } | |
| .status-grid { | |
| display: grid; gap: 1rem; margin: 2rem 0; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| } | |
| .card { | |
| background: rgba(255,255,255,0.03); | |
| border: 1px solid rgba(255,255,255,0.08); | |
| border-radius: 12px; padding: 1.5rem; | |
| text-align: center; | |
| } | |
| .card .label { color: #888; font-size: 0.8rem; text-transform: uppercase; } | |
| .card .value { font-size: 1.3rem; margin-top: 0.3rem; } | |
| .card .value.online { color: #69f0ae; } | |
| .card .value.offline { color: #ff5252; } | |
| .card .value.pending { color: #ffd740; } | |
| .instructions { | |
| background: rgba(179, 136, 255, 0.1); | |
| border: 1px solid rgba(179, 136, 255, 0.2); | |
| border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; | |
| text-align: left; | |
| line-height: 1.8; | |
| } | |
| code { | |
| background: rgba(255,255,255,0.1); | |
| padding: 2px 6px; border-radius: 4px; | |
| font-family: 'Fira Code', monospace; font-size: 0.9rem; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>π Cosmic Reactor</h1> | |
| <p class="subtitle">Agent Zero Control Hub β HF Free Tier</p> | |
| <div class="status-grid"> | |
| <div class="card"> | |
| <div class="label">Cydonia 24B Backend</div> | |
| <div class="value online">β Online</div> | |
| </div> | |
| <div class="card"> | |
| <div class="label">Agent Zero (VPS)</div> | |
| <div class="value pending">β³ Configuring</div> | |
| </div> | |
| <div class="card"> | |
| <div class="label">vLLM Server</div> | |
| <div class="value pending">β³ Configuring</div> | |
| </div> | |
| </div> | |
| <div class="instructions"> | |
| <strong>π§ Architecture:</strong><br><br> | |
| <strong>HF Spaces (Free Tier β cpu-basic):</strong><br> | |
| β’ <code>cosmic-reactor</code> β this control hub<br> | |
| β’ <code>Cydonia-24B</code> β ZeroGPU model backend<br> | |
| β’ <code>Qwen-27B</code> β ZeroGPU model backend<br><br> | |
| <strong>VPS (Agent Zero + vLLM):</strong><br> | |
| β’ Full Agent Zero WebUI + agent system<br> | |
| β’ vLLM serving models at high throughput<br> | |
| β’ Connects to HF backends as fallback<br><br> | |
| <strong>Next step:</strong> Configure VPS connection. | |
| </div> | |
| </div> | |
| </body> | |
| </html> | |
| """ | |
| with gr.Blocks( | |
| title="Cosmic Reactor", | |
| theme=gr.themes.Soft(primary_hue="purple", secondary_hue="violet"), | |
| css="footer { display:none!important } body,gradio-container{background:#0a0a18!important;margin:0!important;padding:0!important;max-width:100%!important}", | |
| ) as demo: | |
| gr.HTML(HTML_CONTENT) | |
| demo.queue().launch(server_port=7860, server_name="0.0.0.0", debug=False) | |