Update app.py
Browse files62 unmodified lines63646566676869707172737462 unmodified linesif submitted and location and roof_size > 0 and electricity_bill >= 0:state_data = df[df['State'].str.contains(location, case=False)].iloc[0]if state_data is not None:ghi = state_data['Avg_GHI (kWh/m²/day)']solar_cost_per_kw = state_data['Solar_Cost_per_kW (₹)']prompt_text = build_prompt(location, roof_size, electricity_bill, ghi, solar_cost_per_kw)# Call Gemini API once for all the batch generationwith st.spinner("Generating solar estimate with Gemini..."):response = model.generate_content(prompt_text)62 unmodified lines636465666768697071727362 unmodified linesif submitted and location and roof_size > 0 and electricity_bill >= 0:state_data = df[df['State'].str.contains(location, case=False)].iloc[0]if state_data is not None:ghi = state_data['Avg_GHI (kWh/m²/day)']solar_cost_per_kw = state_data['Solar_Cost_per_kW (₹)']prompt_text = build_prompt(location, roof_size, electricity_bill, ghi, solar_cost_per_kw)# Call Gemini API once for all the batch generationwith st.spinner("Generating solar estimate with Gemini..."):response = model.generate_content(prompt_text)
app.py+2-3