jayashree commited on
Commit
8ba39f9
·
verified ·
1 Parent(s): ae7a494

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -33,7 +33,19 @@ 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 DuckDuckGoSearchTool(country:str,zipcode:int)-> str:
38
+ """A tool that fetches the closest hospital for the given country & zipcode
39
+ Args:
40
+ country:A string representing the name of the country(e.g India)
41
+ zipcode: A valid zip code of the country
42
+ """
43
+ try:
44
+ DuckDuckGoSearchTool(country,zipcode)
45
+
46
+ except Exception as e:
47
+ return f"Error fetching hospital name for country & zipcode '{country}','{zipcode}': {str(e)}"
48
+
49
  final_answer = FinalAnswerTool()
50
 
51
  # 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: