Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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,
|
| 198 |
if mom_type == "Cool Mom":
|
| 199 |
-
return respond_cool(message,
|
| 200 |
elif mom_type == "Tutor Mom":
|
| 201 |
-
return respond_tutor(message,
|
| 202 |
else:
|
| 203 |
-
return respond_strict(message,
|
| 204 |
|
| 205 |
gr.ChatInterface(
|
| 206 |
fn=route_message,
|
| 207 |
-
additional_inputs=[
|
| 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 |
|