TarikDavis commited on
Commit
f77ca59
·
verified ·
1 Parent(s): 9d2db03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,8 +32,8 @@ def get_weather(location: str, celsius: Optional[bool] = False) -> str:
32
  Returns:
33
  A string describing the current weather at the location.
34
  """
35
- # api_key = "weather_api_key" # Replace with your API key from https://weatherstack.com/
36
- os.environ['WEATHERSTACK_API_KEY'] = 'weather_api_key'
37
  units = "m" if celsius else "f" # 'm' for Celsius, 'f' for Fahrenheit
38
 
39
  url = f"http://api.weatherstack.com/current?access_key={api_key}&query={location}&units={units}"
 
32
  Returns:
33
  A string describing the current weather at the location.
34
  """
35
+ api_key = os.environ['weather_api_key'] # Replace with your API key from https://weatherstack.com/
36
+ # os.environ['WEATHERSTACK_API_KEY'] = 'weather_api_key'
37
  units = "m" if celsius else "f" # 'm' for Celsius, 'f' for Fahrenheit
38
 
39
  url = f"http://api.weatherstack.com/current?access_key={api_key}&query={location}&units={units}"