johann22 commited on
Commit
d533711
1 Parent(s): db478f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -360,7 +360,7 @@ def run(purpose,hist):
360
  action_input,
361
  )
362
  if task == "END":
363
- return history
364
 
365
 
366
 
@@ -478,7 +478,14 @@ examples=[["What are the biggest news stories today?", None, None, None, None, N
478
  ["What are some unique features of Rust that make it stand out compared to other systems programming languages like C++?", None, None, None, None, None,],
479
  ]
480
 
 
 
 
 
 
 
481
 
 
482
  gr.ChatInterface(
483
  fn=run,
484
  chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
@@ -486,4 +493,4 @@ gr.ChatInterface(
486
  examples=examples,
487
  concurrency_limit=20,
488
  ).launch(show_api=False)
489
-
 
360
  action_input,
361
  )
362
  if task == "END":
363
+ return "", history
364
 
365
 
366
 
 
478
  ["What are some unique features of Rust that make it stand out compared to other systems programming languages like C++?", None, None, None, None, None,],
479
  ]
480
 
481
+ with gr.Blocks(concurrency_limit=20) as iface:
482
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
483
+ msg = gr.Textbox()
484
+ clear = gr.ClearButton([msg, chatbot])
485
+ msg.submit(run, [msg, chatbot], [msg, chatbot])
486
+ iface.launch()
487
 
488
+ '''
489
  gr.ChatInterface(
490
  fn=run,
491
  chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
 
493
  examples=examples,
494
  concurrency_limit=20,
495
  ).launch(show_api=False)
496
+ '''