Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,9 +127,9 @@ def respond(message, history, use_spanish, chatbot_mode, destinations, season, l
|
|
| 127 |
chatbot_purpose = f"Chatbot Mode: {', '.join(chatbot_mode)}"
|
| 128 |
print(chatbot_purpose)
|
| 129 |
|
| 130 |
-
if "Packing"
|
| 131 |
messages = [{"role": "system", "content": f"You're a friendly and gen z chatbot. Base your response on the provided context: {top_weather} and {top_luggage}."}]
|
| 132 |
-
elif "Food/Attractions"
|
| 133 |
messages = [{"role": "system", "content": f"You're a friendly and gen z chatbot. Base your response on the provided context: {top_food} and {top_attraction}."}]
|
| 134 |
|
| 135 |
# if history:
|
|
@@ -165,10 +165,9 @@ with gr.Blocks() as demo:
|
|
| 165 |
# βββ left column: your controls βββ
|
| 166 |
with gr.Column(scale=1):
|
| 167 |
use_spanish = gr.Checkbox(label="Use Spanish", value=False)
|
| 168 |
-
gr.
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
label=None
|
| 172 |
)
|
| 173 |
gr.Markdown("### Where are you going?")
|
| 174 |
destinations = gr.CheckboxGroup(
|
|
|
|
| 127 |
chatbot_purpose = f"Chatbot Mode: {', '.join(chatbot_mode)}"
|
| 128 |
print(chatbot_purpose)
|
| 129 |
|
| 130 |
+
if chatbot_mode == "Packing":
|
| 131 |
messages = [{"role": "system", "content": f"You're a friendly and gen z chatbot. Base your response on the provided context: {top_weather} and {top_luggage}."}]
|
| 132 |
+
elif chatbot_mode == "Food/Attractions":
|
| 133 |
messages = [{"role": "system", "content": f"You're a friendly and gen z chatbot. Base your response on the provided context: {top_food} and {top_attraction}."}]
|
| 134 |
|
| 135 |
# if history:
|
|
|
|
| 165 |
# βββ left column: your controls βββ
|
| 166 |
with gr.Column(scale=1):
|
| 167 |
use_spanish = gr.Checkbox(label="Use Spanish", value=False)
|
| 168 |
+
chatbot_mode = gr.Radio(
|
| 169 |
+
choices=["Packing", "Food/Attractions"],
|
| 170 |
+
label="What do you need help with?"
|
|
|
|
| 171 |
)
|
| 172 |
gr.Markdown("### Where are you going?")
|
| 173 |
destinations = gr.CheckboxGroup(
|