Update app.py
Browse files
app.py
CHANGED
|
@@ -19,12 +19,9 @@ def calculate_tiles(area_length, area_width, area_height, tile_length, tile_widt
|
|
| 19 |
|
| 20 |
return floor_area, wall_area, total_area, num_tiles
|
| 21 |
|
| 22 |
-
def calculate_bond_bags(num_tiles,
|
| 23 |
-
#
|
| 24 |
-
# Assuming 1 bag covers 10 tiles as an average consumption
|
| 25 |
-
tiles_per_bag = 10 # Adjust this based on practical considerations
|
| 26 |
num_bags = num_tiles / tiles_per_bag
|
| 27 |
-
|
| 28 |
return num_bags
|
| 29 |
|
| 30 |
def main():
|
|
@@ -70,12 +67,12 @@ def main():
|
|
| 70 |
|
| 71 |
# Input field for bond bag weight and calculation
|
| 72 |
st.header("Bond Bag Estimation")
|
| 73 |
-
|
| 74 |
-
if
|
| 75 |
-
num_bags = calculate_bond_bags(num_tiles,
|
| 76 |
st.write(f"**Estimated Number of Bond Bags Required:** {num_bags:.0f}")
|
| 77 |
else:
|
| 78 |
-
st.warning("Please enter a valid
|
| 79 |
else:
|
| 80 |
st.error("Please enter all dimensions greater than zero.")
|
| 81 |
|
|
|
|
| 19 |
|
| 20 |
return floor_area, wall_area, total_area, num_tiles
|
| 21 |
|
| 22 |
+
def calculate_bond_bags(num_tiles, tiles_per_bag):
|
| 23 |
+
# Calculate the number of bond bags required
|
|
|
|
|
|
|
| 24 |
num_bags = num_tiles / tiles_per_bag
|
|
|
|
| 25 |
return num_bags
|
| 26 |
|
| 27 |
def main():
|
|
|
|
| 67 |
|
| 68 |
# Input field for bond bag weight and calculation
|
| 69 |
st.header("Bond Bag Estimation")
|
| 70 |
+
tiles_per_bag = st.number_input("Number of tiles covered per bond bag:", min_value=0.0, step=0.1, format="%.2f")
|
| 71 |
+
if tiles_per_bag > 0:
|
| 72 |
+
num_bags = calculate_bond_bags(num_tiles, tiles_per_bag)
|
| 73 |
st.write(f"**Estimated Number of Bond Bags Required:** {num_bags:.0f}")
|
| 74 |
else:
|
| 75 |
+
st.warning("Please enter a valid number of tiles covered per bond bag.")
|
| 76 |
else:
|
| 77 |
st.error("Please enter all dimensions greater than zero.")
|
| 78 |
|