Update app.py
Browse files65 unmodified lines666768696970717212 unmodified lines8586878888899091909192939465 unmodified lines if state_data is not None: ghi = state_data['Avg_GHI (kWh/m²/day)'] solar_cost_per_kw = state_data['Solar_Cost_per_kW (₹)'] 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 lines if ":" in point: # Only process lines with a colon try: # Extract the value after the colon key, value = point.split(":") key, value = point.split(":", 1) # Split into two parts only st.write(f"{key.strip()}: {value.strip()}") except IndexError: # Handle cases where the split does not give two parts except ValueError: # Handle cases where the line doesn't split into two parts st.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