nos commited on
Commit
26b6f5b
·
verified ·
1 Parent(s): bea6513

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -46,8 +46,8 @@ def respond(
46
  token = message.choices[0].delta.content
47
 
48
  response += token
49
- yield response
50
-
51
 
52
 
53
  def flip_text(x):
@@ -62,8 +62,10 @@ with gr.Blocks() as demo:
62
 
63
  with gr.Tab("Chat"):
64
  chatbot = gr.Chatbot(scale=5)
65
- msg = gr.Textbox(scale=3)
 
66
  clear = gr.ClearButton([msg, chatbot],scale=1)
 
67
  msg.submit(respond, msg, [msg, chatbot])
68
 
69
  with gr.Tab("ELS"):
 
46
  token = message.choices[0].delta.content
47
 
48
  response += token
49
+ #yield response
50
+ return response
51
 
52
 
53
  def flip_text(x):
 
62
 
63
  with gr.Tab("Chat"):
64
  chatbot = gr.Chatbot(scale=5)
65
+ msg = gr.Textbox(scale=5)
66
+ btn = gr.Button("Send",scale=1)
67
  clear = gr.ClearButton([msg, chatbot],scale=1)
68
+ btn.click(respond, msg,[msg,chatbot])
69
  msg.submit(respond, msg, [msg, chatbot])
70
 
71
  with gr.Tab("ELS"):