ninooo96 commited on
Commit
bdf982f
·
verified ·
1 Parent(s): 94858bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,10 +39,10 @@ def get_weather(city: str) -> str:
39
  Args:
40
  city: A string representing a city
41
  """
42
- url = f"https://wttr.in/{city}?format=3&unit=C" # Formato compatto
43
  response = requests.get(url)
44
  if response.status_code == 200:
45
- return f"The current weather on {city} is {response.text}"
46
  else:
47
  return "Error on fetching weather data."
48
 
 
39
  Args:
40
  city: A string representing a city
41
  """
42
+ url = f"https://wttr.in/{city}?format=%t&unit=C" # Formato compatto
43
  response = requests.get(url)
44
  if response.status_code == 200:
45
+ return f"The current weather on {city} is {str(response.text)}"
46
  else:
47
  return "Error on fetching weather data."
48