upperwal commited on
Commit
a3015fe
·
verified ·
1 Parent(s): 3b63e29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -54,8 +54,13 @@ def predict(message, history):
54
  break
55
  yield partial_message
56
 
 
 
 
 
 
57
  demo = gr.ChatInterface(
58
- predict,
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",