Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -34,17 +34,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
35 |
|
36 |
@tool
|
37 |
-
def get_restaurant_suggestion(food_type:str)-> str:
|
38 |
"""A tool that suggests a restaurant based on food type
|
39 |
Args:
|
40 |
-
food_type: A string representing a valid food type e.g
|
41 |
"""
|
42 |
-
if food_type == "asian":
|
43 |
return "Great Wall"
|
44 |
-
elif food_type == "italian":
|
45 |
return "Mario y Luigi"
|
46 |
else:
|
47 |
-
return "Default restaurant"
|
48 |
|
49 |
|
50 |
final_answer = FinalAnswerTool()
|
|
|
34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
35 |
|
36 |
@tool
|
37 |
+
def get_restaurant_suggestion(food_type: str) -> str:
|
38 |
"""A tool that suggests a restaurant based on food type
|
39 |
Args:
|
40 |
+
food_type: A string representing a valid food type e.g., 'italian'
|
41 |
"""
|
42 |
+
if food_type.lower() == "asian": # Convert input to lowercase to handle case sensitivity
|
43 |
return "Great Wall"
|
44 |
+
elif food_type.lower() == "italian":
|
45 |
return "Mario y Luigi"
|
46 |
else:
|
47 |
+
return "Default restaurant" # Fallback for unmatched inputs
|
48 |
|
49 |
|
50 |
final_answer = FinalAnswerTool()
|