Daemontatox commited on
Commit
47e33fe
·
verified ·
1 Parent(s): c938aae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,7 +2,6 @@ import os
2
  import re
3
  import cohere
4
  import gradio as gr
5
- from threading import Thread
6
  from typing import Iterator, List, Tuple
7
 
8
  # Configuration Constants
@@ -281,6 +280,7 @@ def main():
281
  show_progress=True,
282
  )
283
 
 
284
  message.submit(
285
  chat_response,
286
  inputs=[
@@ -304,6 +304,7 @@ def main():
304
  show_progress=True,
305
  )
306
 
 
307
  submit_click.then(lambda: "", outputs=message)
308
  message.submit(lambda: "", outputs=message)
309
 
 
2
  import re
3
  import cohere
4
  import gradio as gr
 
5
  from typing import Iterator, List, Tuple
6
 
7
  # Configuration Constants
 
280
  show_progress=True,
281
  )
282
 
283
+ # Bind Enter key to submit
284
  message.submit(
285
  chat_response,
286
  inputs=[
 
304
  show_progress=True,
305
  )
306
 
307
+ # Clear input after submission
308
  submit_click.then(lambda: "", outputs=message)
309
  message.submit(lambda: "", outputs=message)
310