File size: 720 Bytes
dca2e0e 32c672b ff5b659 dca2e0e ff5b659 dca2e0e ff5b659 dca2e0e ff5b659 dca2e0e ff5b659 dca2e0e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <!DOCTYPE html>
<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> |