Memoona648 commited on
Commit
fe6a7b0
·
verified ·
1 Parent(s): 326cc34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,10 +21,9 @@ st.title("⛅ Weather Forecasting App")
21
  st.markdown("Enter a city name to get current weather and a 5-day forecast")
22
 
23
  city = st.text_input("🌍 Enter city name", "London")
24
-
25
  if city:
26
  try:
27
- response = client.model(MODEL_ID)({"location": city})
28
  except Exception as e:
29
  st.error(f"API Error: {e}")
30
  else:
@@ -54,3 +53,5 @@ if city:
54
  paper_bgcolor='rgba(0,0,0,0)' if mode=='Dark' else 'white',
55
  font_color='white' if mode=='Dark' else 'black')
56
  st.plotly_chart(fig, use_container_width=True)
 
 
 
21
  st.markdown("Enter a city name to get current weather and a 5-day forecast")
22
 
23
  city = st.text_input("🌍 Enter city name", "London")
 
24
  if city:
25
  try:
26
+ response = client(MODEL_ID, {"location": city}) # Correct way
27
  except Exception as e:
28
  st.error(f"API Error: {e}")
29
  else:
 
53
  paper_bgcolor='rgba(0,0,0,0)' if mode=='Dark' else 'white',
54
  font_color='white' if mode=='Dark' else 'black')
55
  st.plotly_chart(fig, use_container_width=True)
56
+
57
+