Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 82 |
-
return
|
| 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 =
|
| 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!
|