knt21 commited on
Commit
d4b7bce
·
verified ·
1 Parent(s): e0da6bd

Update app.py

Browse files

Fixed syntax error [replaced ," °C" with + " °C"

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -39,7 +39,7 @@ def get_weather(location:str)-> str: #it's import to specify the return type
39
  # Extract weather data
40
  weather_data= current_conditions["weatherDesc"][0]["value"]
41
  # Extract temperature data
42
- temperature_data= current_conditions["temp_C"], "°C"
43
  return f"For {location} location, Weather: {weather_data} Temperature: {temperature_data}"
44
  except Exception as e:
45
  return f"Error fetching weather data for location '{location}': {str(e)}"
 
39
  # Extract weather data
40
  weather_data= current_conditions["weatherDesc"][0]["value"]
41
  # Extract temperature data
42
+ temperature_data= current_conditions["temp_C"]+ " °C"
43
  return f"For {location} location, Weather: {weather_data} Temperature: {temperature_data}"
44
  except Exception as e:
45
  return f"Error fetching weather data for location '{location}': {str(e)}"