dannyskull commited on
Commit
97d5e67
·
verified ·
1 Parent(s): 846713e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,8 @@ import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
 
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -52,7 +54,7 @@ def get_weather(location: str) -> str:
52
  f"and the humidity is {weather.humidity}%."
53
  )
54
  # Run the async function in the event loop
55
- return await(fetch_weather(location))
56
  except Exception as e:
57
  return f"Error fetching weather for '{location}': {str(e)}"
58
 
 
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ import asyncio
8
+ frmom typing import Any
9
 
10
  from Gradio_UI import GradioUI
11
 
 
54
  f"and the humidity is {weather.humidity}%."
55
  )
56
  # Run the async function in the event loop
57
+ return asyncio.run(fetch_weather(location))
58
  except Exception as e:
59
  return f"Error fetching weather for '{location}': {str(e)}"
60