Spaces:
Paused
Paused
Commit
·
f68540d
1
Parent(s):
5b7a382
Update main.py
Browse files
main.py
CHANGED
|
@@ -30,10 +30,10 @@ HTML = """
|
|
| 30 |
const prompt = document.getElementById("prompt");
|
| 31 |
const output = document.getElementById("output");
|
| 32 |
|
| 33 |
-
const ws = new WebSocket("wss://huggingface.co/spaces/DaniilAlpha/answerer-api/answer");
|
| 34 |
ws.onopen = () => console.log("socket open!");
|
| 35 |
ws.onclose = () => console.log("socket closed!");
|
| 36 |
-
ws.onerror = (e) => console.error(`error: ${e}`);
|
| 37 |
ws.onmessage = (event) => output.innerText = event.data;
|
| 38 |
|
| 39 |
function ask(event) {
|
|
|
|
| 30 |
const prompt = document.getElementById("prompt");
|
| 31 |
const output = document.getElementById("output");
|
| 32 |
|
| 33 |
+
const ws = new WebSocket("wss://huggingface.co/spaces/DaniilAlpha/answerer-api:8000/answer");
|
| 34 |
ws.onopen = () => console.log("socket open!");
|
| 35 |
ws.onclose = () => console.log("socket closed!");
|
| 36 |
+
ws.onerror = (e) => console.error(`error: ${JSON.stringify(e)}`);
|
| 37 |
ws.onmessage = (event) => output.innerText = event.data;
|
| 38 |
|
| 39 |
function ask(event) {
|