Akoda35 commited on
Commit
ff5b659
·
verified ·
1 Parent(s): 01634ff

Update theme/templates/index.html

Browse files
Files changed (1) hide show
  1. theme/templates/index.html +20 -19
theme/templates/index.html CHANGED
@@ -4,31 +4,32 @@
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>
 
4
  <title>PyRunner AI Space</title>
5
  <link rel="stylesheet" href="/static/style.css">
6
  </head>
 
7
  <body>
 
8
 
9
+ <h1>PyRunner Agent OS</h1>
10
+
11
+ <p>Backend is running.</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
 
 
 
 
 
 
34
  </body>
35
  </html>