faiyazansariusa commited on
Commit
4932a1e
·
verified ·
1 Parent(s): d8f1179

Update app.py

Browse files

reverted back the changes

Files changed (1) hide show
  1. app.py +0 -14
app.py CHANGED
@@ -35,21 +35,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
35
  except Exception as e:
36
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
37
 
38
- @tool
39
- def get_weather(city):
40
- import requests
41
- api_url = f"https://api.weather.com/v1/location/{city}?apiKey=YOUR_API_KEY"
42
- response = requests.get(api_url)
43
- if response.status_code == 200:
44
- data = response.json()
45
- return data.get("weather", "No weather information available")
46
- else:
47
- return "Error: Unable to fetch weather data."
48
 
49
- # Execute the function and prepare the final answer
50
- result = get_weather("New York")
51
- final_answer = f"The current weather in New York is: {result}"
52
- print(final_answer)
53
 
54
 
55
  final_answer = FinalAnswerTool()
 
35
  except Exception as e:
36
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
37
 
 
 
 
 
 
 
 
 
 
 
38
 
 
 
 
 
39
 
40
 
41
  final_answer = FinalAnswerTool()