RithikaChalam commited on
Commit
22adad6
·
verified ·
1 Parent(s): 9f62d5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -194,17 +194,17 @@ with gr.Blocks() as demo:
194
  tutor_button.click(fn=set_mom_tutor, inputs=[], outputs=mom_type)
195
  strict_button.click(fn=set_mom_strict, inputs=[], outputs=mom_type)
196
 
197
- def route_message(message, history, mom_type):
198
  if mom_type == "Cool Mom":
199
- return respond_cool(message, history)
200
  elif mom_type == "Tutor Mom":
201
- return respond_tutor(message, history)
202
  else:
203
- return respond_strict(message, history)
204
 
205
  gr.ChatInterface(
206
  fn=route_message,
207
- additional_inputs=[history, mom_type],
208
  title="StudyMama"
209
  )
210
 
 
194
  tutor_button.click(fn=set_mom_tutor, inputs=[], outputs=mom_type)
195
  strict_button.click(fn=set_mom_strict, inputs=[], outputs=mom_type)
196
 
197
+ def route_message(message, chat_history, mom_type):
198
  if mom_type == "Cool Mom":
199
+ return respond_cool(message, chat_history)
200
  elif mom_type == "Tutor Mom":
201
+ return respond_tutor(message, chat_history)
202
  else:
203
+ return respond_strict(message, chat_history)
204
 
205
  gr.ChatInterface(
206
  fn=route_message,
207
+ additional_inputs=[mom_type],
208
  title="StudyMama"
209
  )
210