Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,13 @@ def chat(message:str, history):
|
|
| 7 |
|
| 8 |
|
| 9 |
def slow_echo_chat(message, history):
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
# gr.ChatInterface(chat).launch()
|
| 16 |
-
gr.ChatInterface(
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
def slow_echo_chat(message, history):
|
| 10 |
+
answer = submitUserMessage(message)
|
| 11 |
+
for i in range(len(answer)):
|
| 12 |
+
time.sleep(0.01)
|
| 13 |
+
yield answer[: i+1]
|
| 14 |
|
| 15 |
|
| 16 |
# gr.ChatInterface(chat).launch()
|
| 17 |
+
interface = gr.ChatInterface(slow_echo_chat)
|
| 18 |
+
|
| 19 |
+
interface.launch()
|