kavansaun commited on
Commit
af74125
·
verified ·
1 Parent(s): e30b970

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -87,12 +87,12 @@ with gr.Blocks(theme=gr.themes.Monochrome(),css="footer{display:none !important}
87
  return gr.Textbox(value = None, show_label = False, placeholder = initial_message, container = False)
88
 
89
  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)
90
- Chatbot = gr.Chatbot(label="Anonymous User",layout=['bubble'],show_share_button = False,show_copy_button = False,show_progress = 'hidden') # Creating a gradio-chatbot User Interface with the label "Anonymous User".
91
 
92
- txt = gr.Textbox(show_label = False, placeholder = initial_message, container = False)
93
 
94
  txt.submit(fn = return_sent, inputs = None, outputs = txt)
95
- txt.submit(fn = predict_prompt, inputs = [txt, user_id], outputs = Chatbot, show_progress = 'hidden') # Adding the messages into the row with gradio.
96
  Chatbot.change(fn = return_placeholder, inputs = None, outputs = txt)
97
 
98
  chatblock.launch() # launch!
 
87
  return gr.Textbox(value = None, show_label = False, placeholder = initial_message, container = False)
88
 
89
  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)
90
+ Chatbot = gr.Chatbot(label="Anonymous User",layout=['bubble'],show_share_button = False,show_copy_button = False) # Creating a gradio-chatbot User Interface with the label "Anonymous User".
91
 
92
+ txt = gr.Textbox(show_label = False, placeholder = initial_message, container = False,show_progress = 'hidden')
93
 
94
  txt.submit(fn = return_sent, inputs = None, outputs = txt)
95
+ txt.submit(fn = predict_prompt, inputs = [txt, user_id], outputs = Chatbot) # Adding the messages into the row with gradio.
96
  Chatbot.change(fn = return_placeholder, inputs = None, outputs = txt)
97
 
98
  chatblock.launch() # launch!