riyamalshe commited on
Commit
5e6dc47
·
verified ·
1 Parent(s): e149275

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -182,5 +182,10 @@ with gr.Blocks() as demo:
182
  cool_button.click(fn=respond_cool, inputs=[], outputs=[])
183
  tutor_button.click(fn=respond_tutor, inputs=[], outputs=[])
184
  strict_button.click(fn=respond_strict, inputs=[], outputs=[])
185
- chatbot = gr.ChatInterface(respond, type = 'messages')
 
 
 
 
 
186
  demo.launch()
 
182
  cool_button.click(fn=respond_cool, inputs=[], outputs=[])
183
  tutor_button.click(fn=respond_tutor, inputs=[], outputs=[])
184
  strict_button.click(fn=respond_strict, inputs=[], outputs=[])
185
+ if cool_button.click():
186
+ chatbot = gr.ChatInterface(respond_cool, type = 'messages')
187
+ elif tutor_button.click():
188
+ chatbot = gr.ChatInterface(respond_tutor, type = 'messages')
189
+ else:
190
+ chatbot = gr.ChatInterface(respond_strict, type = 'messages')
191
  demo.launch()