Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import datetime
|
|
| 3 |
import requests
|
| 4 |
import pytz
|
| 5 |
import yaml
|
|
|
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
|
@@ -35,16 +36,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 35 |
|
| 36 |
@tool
|
| 37 |
def get_restaurant_suggestion(food_type: str) -> str:
|
| 38 |
-
"""A tool that suggests a restaurant
|
| 39 |
Args:
|
| 40 |
food_type: A string representing a valid food type e.g., 'italian'
|
| 41 |
"""
|
| 42 |
-
|
| 43 |
-
|
| 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()
|
|
|
|
| 3 |
import requests
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
+
import random
|
| 7 |
from tools.final_answer import FinalAnswerTool
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
|
|
|
| 36 |
|
| 37 |
@tool
|
| 38 |
def get_restaurant_suggestion(food_type: str) -> str:
|
| 39 |
+
"""A tool that suggests a random restaurant suggestion
|
| 40 |
Args:
|
| 41 |
food_type: A string representing a valid food type e.g., 'italian'
|
| 42 |
"""
|
| 43 |
+
restaurant_list= ["Great Wall","Mario y Luigi","Default restaurant"]
|
| 44 |
+
return random.choice(restaurant_list)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
final_answer = FinalAnswerTool()
|