khaled06 commited on
Commit
313abb8
·
verified ·
1 Parent(s): 884a50d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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 = 'ff33163dc424d6430b66535cb02dda7d'
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: