Spaces:
Paused
Paused
Commit
·
1df84d8
1
Parent(s):
d06942f
Update main.py
Browse files
main.py
CHANGED
@@ -59,10 +59,17 @@ async def index():
|
|
59 |
async def answer(ws: WebSocket):
|
60 |
await ws.accept()
|
61 |
|
|
|
|
|
62 |
input = await ws.receive_text()
|
63 |
output = answerer(input, 32)
|
|
|
|
|
|
|
64 |
for el in output:
|
65 |
print(f"sent: '{el}'")
|
66 |
await ws.send_text(el)
|
67 |
|
68 |
-
await ws.close()
|
|
|
|
|
|
59 |
async def answer(ws: WebSocket):
|
60 |
await ws.accept()
|
61 |
|
62 |
+
print("ws connected!")
|
63 |
+
|
64 |
input = await ws.receive_text()
|
65 |
output = answerer(input, 32)
|
66 |
+
|
67 |
+
print("output ready!")
|
68 |
+
|
69 |
for el in output:
|
70 |
print(f"sent: '{el}'")
|
71 |
await ws.send_text(el)
|
72 |
|
73 |
+
await ws.close()
|
74 |
+
|
75 |
+
print("ws closed!")
|