Update src/app.py
Browse files- src/app.py +31 -30
src/app.py
CHANGED
|
@@ -183,7 +183,7 @@ def create_carbon_footprint_app() -> gr.Blocks:
|
|
| 183 |
info="Required: Full legal company name",
|
| 184 |
)
|
| 185 |
with gr.Row():
|
| 186 |
-
with gr.Column(variant="
|
| 187 |
avg_electric_bill = gr.Number(
|
| 188 |
value=1.0,
|
| 189 |
label="Average Electricity Bill (€)",
|
|
@@ -202,36 +202,37 @@ def create_carbon_footprint_app() -> gr.Blocks:
|
|
| 202 |
info="Monthly Fuel bill for transport",
|
| 203 |
)
|
| 204 |
|
| 205 |
-
with gr.
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
|
| 219 |
-
|
| 220 |
-
monthly_waste_generated = gr.Number(
|
| 221 |
-
value=1.0,
|
| 222 |
-
label="Monthly Waste Generated (kg)",
|
| 223 |
-
minimum=0.01,
|
| 224 |
-
info="Total waste produced monthly",
|
| 225 |
-
)
|
| 226 |
-
recycled_waste_percent = gr.Number(
|
| 227 |
-
value=0.0,
|
| 228 |
-
label="Recycled Waste (%)",
|
| 229 |
-
minimum=0.0,
|
| 230 |
-
maximum=100.0,
|
| 231 |
-
info="Percentage of waste recycled",
|
| 232 |
-
)
|
| 233 |
-
|
| 234 |
-
with gr.Column(scale=1):
|
| 235 |
output_plot = gr.HTML(label="Carbon Footprint Report")
|
| 236 |
# Create a row for buttons
|
| 237 |
with gr.Row():
|
|
|
|
| 183 |
info="Required: Full legal company name",
|
| 184 |
)
|
| 185 |
with gr.Row():
|
| 186 |
+
with gr.Column(variant="panel"):
|
| 187 |
avg_electric_bill = gr.Number(
|
| 188 |
value=1.0,
|
| 189 |
label="Average Electricity Bill (€)",
|
|
|
|
| 202 |
info="Monthly Fuel bill for transport",
|
| 203 |
)
|
| 204 |
|
| 205 |
+
with gr.Row(variant="panel"):
|
| 206 |
+
with gr.Column(variant="compact"):
|
| 207 |
+
annual_travel_kms = gr.Number(
|
| 208 |
+
value=1.0,
|
| 209 |
+
label="Annual Business Travel (km)",
|
| 210 |
+
minimum=0.01,
|
| 211 |
+
info="Total kilometers traveled by employees",
|
| 212 |
+
)
|
| 213 |
+
fuel_efficiency = gr.Number(
|
| 214 |
+
value=1.0,
|
| 215 |
+
label="Vehicle Fuel Efficiency (L/100 km)",
|
| 216 |
+
minimum=0.01,
|
| 217 |
+
info="Average fleet fuel consumption",
|
| 218 |
+
)
|
| 219 |
+
|
| 220 |
+
with gr.Column(variant="compact"):
|
| 221 |
+
monthly_waste_generated = gr.Number(
|
| 222 |
+
value=1.0,
|
| 223 |
+
label="Monthly Waste Generated (kg)",
|
| 224 |
+
minimum=0.01,
|
| 225 |
+
info="Total waste produced monthly",
|
| 226 |
+
)
|
| 227 |
+
recycled_waste_percent = gr.Number(
|
| 228 |
+
value=0.0,
|
| 229 |
+
label="Recycled Waste (%)",
|
| 230 |
+
minimum=0.0,
|
| 231 |
+
maximum=100.0,
|
| 232 |
+
info="Percentage of waste recycled",
|
| 233 |
+
)
|
| 234 |
|
| 235 |
+
with gr.Column(scale=2):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
output_plot = gr.HTML(label="Carbon Footprint Report")
|
| 237 |
# Create a row for buttons
|
| 238 |
with gr.Row():
|