iconic7 commited on
Commit
6921589
·
verified ·
1 Parent(s): 05f18ac

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +9 -10
static/index.html CHANGED
@@ -11,16 +11,15 @@
11
  <button onclick="predict()">Predict</button>
12
  <pre id="output"></pre>
13
  <script>
14
- async function predict() {
15
- const input = document.getElementById("input").value;
16
- const response = await fetch("/predict", {
17
- method: "POST",
18
- headers: { "Content-Type": "application/json" },
19
- body: JSON.stringify({ text: input })
20
- });
21
- const result = await response.json();
22
- document.getElementById("output").textContent = JSON.stringify(result.result, null, 2);
23
- }
24
  </script>
25
  </body>
26
  </html>
 
11
  <button onclick="predict()">Predict</button>
12
  <pre id="output"></pre>
13
  <script>
14
+ const response = await fetch("https://iconic7--Finance_GPT.hf.space/predict", {
15
+ method: "POST",
16
+ headers: {
17
+ "Content-Type": "application/json",
18
+ },
19
+ body: JSON.stringify({ text: userInput }),
20
+ });
21
+ const result = await response.json();
22
+
 
23
  </script>
24
  </body>
25
  </html>