sscnitdgp commited on
Commit
f58b2f0
·
verified ·
1 Parent(s): 9fe7241

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def check_carbon_intensity(name: str) -> dict:
24
  try:
25
  response = requests.get('https://carbonaggr-ap04s.samsungiots.com/v1/carbon-intensity/latest?zone=AU-NSW', headers=headers)
26
  response.raise_for_status() # Raise an exception for HTTP errors
27
- return response
28
  except requests.exceptions.RequestException as e:
29
  print(f"An error occurred: {e}")
30
  return None
 
24
  try:
25
  response = requests.get('https://carbonaggr-ap04s.samsungiots.com/v1/carbon-intensity/latest?zone=AU-NSW', headers=headers)
26
  response.raise_for_status() # Raise an exception for HTTP errors
27
+ return response.json()
28
  except requests.exceptions.RequestException as e:
29
  print(f"An error occurred: {e}")
30
  return None