Update app.py
Browse files
app.py
CHANGED
@@ -43,12 +43,26 @@ def build_prompt(location, project_type, roof_size=None, desired_kwh=None, elect
|
|
43 |
if project_type == "Rooftop Solar":
|
44 |
prompt = f"""
|
45 |
You are a solar project estimator tool. Based on the following details, calculate and return only the values without any extra description:
|
|
|
46 |
Project Type: Rooftop Solar
|
47 |
Location: {location}
|
48 |
Roof size: {roof_size} sq meters
|
49 |
Monthly electricity bill: ₹{electricity_bill}
|
50 |
Average GHI: {ghi} kWh/m²/day
|
51 |
Solar system cost per kW: ₹{solar_cost_per_kw}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
Respond strictly in this format (do not add anything extra):
|
53 |
Estimated solar system size in kW: <value>
|
54 |
Estimated daily solar output in kWh: <value>
|
@@ -59,12 +73,26 @@ Payback period in years: <value>
|
|
59 |
else: # Ground Mount Solar
|
60 |
prompt = f"""
|
61 |
You are a solar project estimator tool. Based on the following details, calculate and return only the values without any extra description:
|
|
|
62 |
Project Type: Ground Mount Solar
|
63 |
Location: {location}
|
64 |
Desired monthly solar production: {desired_kwh} kWh
|
65 |
Monthly electricity bill: ₹{electricity_bill}
|
66 |
Average GHI: {ghi} kWh/m²/day
|
67 |
Solar system cost per kW: ₹{solar_cost_per_kw}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
Respond strictly in this format (do not add anything extra):
|
69 |
Required solar system size in kW: <value>
|
70 |
Estimated daily solar output in kWh: <value>
|
|
|
43 |
if project_type == "Rooftop Solar":
|
44 |
prompt = f"""
|
45 |
You are a solar project estimator tool. Based on the following details, calculate and return only the values without any extra description:
|
46 |
+
|
47 |
Project Type: Rooftop Solar
|
48 |
Location: {location}
|
49 |
Roof size: {roof_size} sq meters
|
50 |
Monthly electricity bill: ₹{electricity_bill}
|
51 |
Average GHI: {ghi} kWh/m²/day
|
52 |
Solar system cost per kW: ₹{solar_cost_per_kw}
|
53 |
+
|
54 |
+
Formulas to be used:
|
55 |
+
1. Estimated Solar System Size in kW:
|
56 |
+
System Size (kW) = Electricity Bill (₹) / Solar Cost per kW (₹)
|
57 |
+
2. Estimated Daily Solar Output in kWh:
|
58 |
+
Daily Output (kWh) = System Size (kW) * Average GHI (kWh/m²/day)
|
59 |
+
3. Total System Cost in ₹:
|
60 |
+
Total Cost (₹) = System Size (kW) * Solar Cost per kW (₹)
|
61 |
+
4. Monthly Savings in ₹:
|
62 |
+
Monthly Savings (₹) = (System Output (kWh) / Monthly Consumption (kWh)) * Electricity Bill (₹)
|
63 |
+
5. Payback Period in Years:
|
64 |
+
Payback Period (Years) = Total System Cost (₹) / Annual Savings (₹), where Annual Savings (₹) = Monthly Savings (₹) * 12
|
65 |
+
|
66 |
Respond strictly in this format (do not add anything extra):
|
67 |
Estimated solar system size in kW: <value>
|
68 |
Estimated daily solar output in kWh: <value>
|
|
|
73 |
else: # Ground Mount Solar
|
74 |
prompt = f"""
|
75 |
You are a solar project estimator tool. Based on the following details, calculate and return only the values without any extra description:
|
76 |
+
|
77 |
Project Type: Ground Mount Solar
|
78 |
Location: {location}
|
79 |
Desired monthly solar production: {desired_kwh} kWh
|
80 |
Monthly electricity bill: ₹{electricity_bill}
|
81 |
Average GHI: {ghi} kWh/m²/day
|
82 |
Solar system cost per kW: ₹{solar_cost_per_kw}
|
83 |
+
|
84 |
+
Formulas to be used:
|
85 |
+
1. Required Solar System Size in kW:
|
86 |
+
Required System Size (kW) = Desired Monthly Production (kWh) / (30 * Average Solar Output per Day (kWh/m²/day))
|
87 |
+
2. Estimated Daily Solar Output in kWh:
|
88 |
+
Daily Output (kWh) = System Size (kW) * Average GHI (kWh/m²/day)
|
89 |
+
3. Total System Cost in ₹:
|
90 |
+
Total Cost (₹) = System Size (kW) * Solar Cost per kW (₹)
|
91 |
+
4. Monthly Savings in ₹:
|
92 |
+
Monthly Savings (₹) = (System Output (kWh) / Monthly Consumption (kWh)) * Electricity Bill (₹)
|
93 |
+
5. Payback Period in Years:
|
94 |
+
Payback Period (Years) = Total System Cost (₹) / Annual Savings (₹), where Annual Savings (₹) = Monthly Savings (₹) * 12
|
95 |
+
|
96 |
Respond strictly in this format (do not add anything extra):
|
97 |
Required solar system size in kW: <value>
|
98 |
Estimated daily solar output in kWh: <value>
|