tommy24 commited on
Commit
ce7942c
·
1 Parent(s): 73dbe92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -999,6 +999,7 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
999
  'units': unit
1000
  }
1001
  response = requests.get('https://api.openweathermap.org/data/2.5/weather', params=params)
 
1002
  if response.status_code == 200:
1003
  temperature = weather_data.get('main', {}).get('temp', 'TEMP_FROM_THE_JSON')
1004
  forecast = [item.get('description', '') for item in weather_data.get('weather', [])]
@@ -1010,8 +1011,7 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
1010
  "forecast": forecast
1011
  }
1012
 
1013
- return json.dumps(new_json, indent=2)
1014
-
1015
  else:
1016
  return None
1017
 
 
999
  'units': unit
1000
  }
1001
  response = requests.get('https://api.openweathermap.org/data/2.5/weather', params=params)
1002
+ print(response.status_code)
1003
  if response.status_code == 200:
1004
  temperature = weather_data.get('main', {}).get('temp', 'TEMP_FROM_THE_JSON')
1005
  forecast = [item.get('description', '') for item in weather_data.get('weather', [])]
 
1011
  "forecast": forecast
1012
  }
1013
 
1014
+ return new_json
 
1015
  else:
1016
  return None
1017