Update index.html
Browse files123456789101112131415161718123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Autonomous Compute Arbitrage Gateway</title> <style> body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0f172a; color: #f8fafc; padding: 20px; display: flex; justify-content: center; } .card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; max-width: 500px; width: 100%; padding: 24px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); } h2 { margin-top: 0; color: #38bdf8; font-size: 1.4rem; } label { display: block; margin-top: 15px; font-weight: 600; color: #94a3b8; font-size: 0.9rem; } select, input { width: 100%; padding: 10px; margin-top: 6px; border-radius: 6px; border: 1px solid #475569; background: #0f172a; color: #fff; box-sizing: border-box; } button { width: 100%; margin-top: 20px; padding: 12px; background: #0284c7; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1rem; } button:hover { background: #0369a1; } .output { margin-top: 20px; background: #0f172a; border: 1px solid #334155; border-radius: 6px; padding: 12px; font-family: monospace; font-size: 0.85rem; color: #4ade80; white-space: pre-wrap; word-break: break-all; } </style></head><body> <div class="card"> <h2>⚡ Liquid Compute Dispatcher</h2> <p style="font-size: 0.85rem; color: #94a3b8;">Decentralized GPU Compute Allocation & Settlement Router</p> <label for="gpu">Select Compute Hardware</label> <select id="gpu"> <option value="NVIDIA H100">NVIDIA H100 (Arbitrage Spread: $2.70/hr)</option> <option value="NVIDIA A100">NVIDIA A100 (Arbitrage Spread: $1.68/hr)</option> <option value="RTX 4090">RTX 4090 (Arbitrage Spread: $0.57/hr)</option> </select>
<label for="hours">Duration (Hours): <span id="hrs-val">5</span> hrs</label> <input type="range" id="hours" min="1" max="168" value="5" oninput="document.getElementById('hrs-val').innerText = this.value">
<button onclick="dispatchJob()">🚀 Instant Quote & Dispatch Node</button>
<div id="result" class="output" style="display:none;"></div> </div>
<script> async function dispatchJob() { const gpu = document.getElementById('gpu').value; const hours = document.getElementById('hours').value; const out = document.getElementById('result'); out.style.display = 'block'; out.innerText = 'Connecting to Cloudflare Sentinel...';
try { const res = await fetch("https://compute-arbitrage-engine.sarkarirojgarofficials.workers.dev/", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ gpu: gpu, hours: Number(hours) }) }); const data = await res.json(); out.innerText = JSON.stringify(data, null, 2); } catch (err) { out.innerText = 'Error: ' + err.message; } } </script></body></html>index.html+59-18