Akoda35 commited on
Commit
32c672b
·
verified ·
1 Parent(s): b5d7148

Update theme/templates/index.html

Browse files
Files changed (1) hide show
  1. theme/templates/index.html +20 -12
theme/templates/index.html CHANGED
@@ -4,23 +4,31 @@
4
  <title>PyRunner AI Space</title>
5
  <link rel="stylesheet" href="/static/style.css">
6
  </head>
 
7
  <body>
 
 
 
8
 
9
- <div class="container">
10
- <h1>PyRunner AI Orchestrator</h1>
11
 
12
- <p>Your lightweight AI backend is running.</p>
13
 
14
- <div class="card">
15
- <h2>Endpoints</h2>
 
16
 
17
- <ul>
18
- <li>/health</li>
19
- <li>/generate</li>
20
- <li>/image/upload</li>
21
- </ul>
22
- </div>
23
- </div>
24
 
 
 
 
 
 
25
  </body>
26
  </html>
 
4
  <title>PyRunner AI Space</title>
5
  <link rel="stylesheet" href="/static/style.css">
6
  </head>
7
+
8
  <body>
9
+ <h1>PyRunner Agent OS</h1>
10
+
11
+ <p>Backend is running successfully.</p>
12
 
13
+ <input id="prompt" placeholder="Enter prompt..." />
14
+ <button onclick="send()">Send</button>
15
 
16
+ <pre id="out"></pre>
17
 
18
+ <script>
19
+ async function send() {
20
+ const prompt = document.getElementById("prompt").value;
21
 
22
+ const res = await fetch("/api/agent", {
23
+ method: "POST",
24
+ headers: {"Content-Type": "application/json"},
25
+ body: JSON.stringify({prompt})
26
+ });
 
 
27
 
28
+ const data = await res.json();
29
+ document.getElementById("out").innerText =
30
+ JSON.stringify(data, null, 2);
31
+ }
32
+ </script>
33
  </body>
34
  </html>