kavansaun commited on
Commit
2a53543
·
verified ·
1 Parent(s): 6cd7fed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -78,15 +78,15 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
78
 
79
  return response # Returning the chat bot response
80
 
81
- def return_inputs(inputs):
82
- return inputs
83
 
84
  initial_message = "Please write your prompt here and press 'enter'" # Initial message for the User Interface (basically the message for the typing input area so change the message under the quotes if you want to change that)
85
  Chatbot = gr.Chatbot(label="Anonymous User",layout=['bubble']) # Creating a gradio-chatbot User Interface with the label "Anonymous User".
86
 
87
  txt = gr.Textbox(show_label=False, placeholder = initial_message, container=False)
88
 
89
- txt.submit(fn = return_inputs, inputs = txt, outputs = Chatbot)
90
  txt.submit(fn = predict_prompt, inputs = [txt, user_id], outputs = Chatbot, show_progress = 'hidden') # Adding the messages into the row with gradio.
91
 
92
  chatblock.launch() # launch!
 
78
 
79
  return response # Returning the chat bot response
80
 
81
+ def return_sent():
82
+ return 'message sent, please wait to connect...'
83
 
84
  initial_message = "Please write your prompt here and press 'enter'" # Initial message for the User Interface (basically the message for the typing input area so change the message under the quotes if you want to change that)
85
  Chatbot = gr.Chatbot(label="Anonymous User",layout=['bubble']) # Creating a gradio-chatbot User Interface with the label "Anonymous User".
86
 
87
  txt = gr.Textbox(show_label=False, placeholder = initial_message, container=False)
88
 
89
+ txt.submit(fn = return_sent, inputs = None, outputs = txt)
90
  txt.submit(fn = predict_prompt, inputs = [txt, user_id], outputs = Chatbot, show_progress = 'hidden') # Adding the messages into the row with gradio.
91
 
92
  chatblock.launch() # launch!