Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,18 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
|
|
|
| 37 |
final_answer = FinalAnswerTool()
|
| 38 |
|
| 39 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
|
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
| 36 |
+
@tool
|
| 37 |
+
def search_duckduckgo(query: str) -> str:
|
| 38 |
+
"""Search DuckDuckGo for a query."""
|
| 39 |
+
results = ddg(query, max_results=3)
|
| 40 |
+
return "\n".join([r["body"] for r in results])
|
| 41 |
+
|
| 42 |
+
@tool
|
| 43 |
+
def generate_followup_email(topic: str) -> str:
|
| 44 |
+
"""Generate a follow-up email for a given topic."""
|
| 45 |
+
return f"Hi there,\n\nJust following up on our previous discussion about {topic}. Let me know if you have any updates!"
|
| 46 |
|
| 47 |
+
|
| 48 |
final_answer = FinalAnswerTool()
|
| 49 |
|
| 50 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|