Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ 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_property(location: str) -> str:
|
| 38 |
"""
|
| 39 |
A tool to that shows property.
|
| 40 |
Args:
|
|
@@ -42,8 +42,9 @@ def get_property(location: str) -> str:
|
|
| 42 |
"""
|
| 43 |
try:
|
| 44 |
#
|
|
|
|
| 45 |
search = DuckDuckGoSearchTool.forward(location)
|
| 46 |
-
return f"property at {location} is: {search}"
|
| 47 |
except Exception as e:
|
| 48 |
return f"error fetching results for location '{location}': {str(e)}"
|
| 49 |
|
|
@@ -79,4 +80,4 @@ agent = CodeAgent(
|
|
| 79 |
)
|
| 80 |
|
| 81 |
|
| 82 |
-
GradioUI(agent).launch(
|
|
|
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
@tool
|
| 37 |
+
def get_property(location: str, title: str, count: int) -> str:
|
| 38 |
"""
|
| 39 |
A tool to that shows property.
|
| 40 |
Args:
|
|
|
|
| 42 |
"""
|
| 43 |
try:
|
| 44 |
#
|
| 45 |
+
manyata_search = ManyataSearchTool.searchDb("property", title + location, count) #TODO: create the ManyataSearchTool under tools
|
| 46 |
search = DuckDuckGoSearchTool.forward(location)
|
| 47 |
+
return f"property at {location} is: {manyata_search} and on the web includes {search}"
|
| 48 |
except Exception as e:
|
| 49 |
return f"error fetching results for location '{location}': {str(e)}"
|
| 50 |
|
|
|
|
| 80 |
)
|
| 81 |
|
| 82 |
|
| 83 |
+
GradioUI(agent).launch()
|