Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,13 @@ def predict(message, history):
|
|
54 |
break
|
55 |
yield partial_message
|
56 |
|
|
|
|
|
|
|
|
|
|
|
57 |
demo = gr.ChatInterface(
|
58 |
-
|
59 |
chatbot=gr.Chatbot(height=300),
|
60 |
textbox=gr.Textbox(placeholder="Try Pragna SFT", container=False, scale=7),
|
61 |
title="pragna-1b-it",
|
|
|
54 |
break
|
55 |
yield partial_message
|
56 |
|
57 |
+
def slow_echo(message, history):
|
58 |
+
for i in range(len(message)):
|
59 |
+
time.sleep(0.05)
|
60 |
+
yield "You typed: " + message[: i+1]
|
61 |
+
|
62 |
demo = gr.ChatInterface(
|
63 |
+
slow_echo,
|
64 |
chatbot=gr.Chatbot(height=300),
|
65 |
textbox=gr.Textbox(placeholder="Try Pragna SFT", container=False, scale=7),
|
66 |
title="pragna-1b-it",
|