| <html> | |
| <head> | |
| <title>PyRunner AI Space</title> | |
| <link rel="stylesheet" href="/static/style.css"> | |
| </head> | |
| <body> | |
| <h1>PyRunner Agent OS</h1> | |
| <p>Backend is running.</p> | |
| <input id="prompt" placeholder="Enter prompt..." /> | |
| <button onclick="send()">Send</button> | |
| <pre id="out"></pre> | |
| <script> | |
| async function send() { | |
| const prompt = document.getElementById("prompt").value; | |
| const res = await fetch("/api/agent", { | |
| method: "POST", | |
| headers: {"Content-Type": "application/json"}, | |
| body: JSON.stringify({prompt}) | |
| }); | |
| const data = await res.json(); | |
| document.getElementById("out").innerText = | |
| JSON.stringify(data, null, 2); | |
| } | |
| </script> | |
| </body> | |
| </html> |