Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import datetime
|
|
3 |
import requests
|
4 |
import pytz
|
5 |
import yaml
|
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
@@ -40,7 +41,7 @@ def get_weather_api(city: str) -> str:
|
|
40 |
Args:
|
41 |
city (str): A string that represents a city name.
|
42 |
"""
|
43 |
-
api_key =
|
44 |
url = f"http://api.weatherstack.com/current?access_key={api_key}&query={city}"
|
45 |
|
46 |
try:
|
|
|
3 |
import requests
|
4 |
import pytz
|
5 |
import yaml
|
6 |
+
import os
|
7 |
from tools.final_answer import FinalAnswerTool
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
|
|
41 |
Args:
|
42 |
city (str): A string that represents a city name.
|
43 |
"""
|
44 |
+
api_key = os.environ["weather_api"]
|
45 |
url = f"http://api.weatherstack.com/current?access_key={api_key}&query={city}"
|
46 |
|
47 |
try:
|