Update app.py
Browse files65 unmodified lines6667686970717212 unmodified lines8586878889909192939465 unmodified linesif 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)12 unmodified linesif ":" in point: # Only process lines with a colontry:# Extract the value after the colonkey, value = point.split(":")st.write(f"{key.strip()}: {value.strip()}")except IndexError:# Handle cases where the split does not give two partsst.warning("There was an issue processing the response.")else:st.error("Sorry, the location entered does not match any available data.")65 unmodified lines6667686970717212 unmodified lines8586878889909192939465 unmodified linesif 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)12 unmodified linesif ":" in point: # Only process lines with a colontry:# Extract the value after the colonkey, value = point.split(":", 1) # Split into two parts onlyst.write(f"{key.strip()}: {value.strip()}")except ValueError:# Handle cases where the line doesn't split into two partsst.warning("There was an issue processing the response.")else:st.error("Sorry, the location entered does not match any available data.")
app.py+4-4