MLDeveloper commited on
Commit
b003a37
·
verified ·
1 Parent(s): 96abbdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -63,12 +63,11 @@ def build_prompt(location, roof_size, electricity_bill, ghi, solar_cost_per_kw):
63
  if submitted and location and roof_size > 0 and electricity_bill >= 0:
64
  state_data = df[df['State'].str.contains(location, case=False)].iloc[0]
65
 
66
- if state_data is not None:
67
  ghi = state_data['Avg_GHI (kWh/m²/day)']
68
- solar_cost_per_kw = state_data['Solar_Cost_per_kW (₹)']
69
 
70
  prompt_text = build_prompt(location, roof_size, electricity_bill, ghi, solar_cost_per_kw)
71
-
72
  # Call Gemini API once for all the batch generation
73
  with st.spinner("Generating solar estimate with Gemini..."):
74
  response = model.generate_content(prompt_text)
 
63
  if submitted and location and roof_size > 0 and electricity_bill >= 0:
64
  state_data = df[df['State'].str.contains(location, case=False)].iloc[0]
65
 
66
+ if state_data is not None:
67
  ghi = state_data['Avg_GHI (kWh/m²/day)']
68
+ solar_cost_per_kw = state_data['Solar_Cost_per_kW (₹)']
69
 
70
  prompt_text = build_prompt(location, roof_size, electricity_bill, ghi, solar_cost_per_kw)
 
71
  # Call Gemini API once for all the batch generation
72
  with st.spinner("Generating solar estimate with Gemini..."):
73
  response = model.generate_content(prompt_text)