Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,8 +31,10 @@ def main():
|
|
| 31 |
help="The maximum allowable velocity of the fluid in the pipe."
|
| 32 |
)
|
| 33 |
|
| 34 |
-
#
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
if velocity > 0:
|
| 37 |
diameter = calculate_pipe_diameter(flow_rate, velocity)
|
| 38 |
if diameter:
|
|
@@ -42,8 +44,16 @@ def main():
|
|
| 42 |
else:
|
| 43 |
st.error("Velocity must be greater than zero.")
|
| 44 |
|
|
|
|
|
|
|
|
|
|
| 45 |
st.sidebar.markdown("---")
|
| 46 |
-
st.sidebar.info("
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
if __name__ == "__main__":
|
| 49 |
main()
|
|
|
|
|
|
| 31 |
help="The maximum allowable velocity of the fluid in the pipe."
|
| 32 |
)
|
| 33 |
|
| 34 |
+
# Button to calculate pipe diameter
|
| 35 |
+
calculate_button = st.button("🔄 Generate Pipe Diameter")
|
| 36 |
+
|
| 37 |
+
if calculate_button:
|
| 38 |
if velocity > 0:
|
| 39 |
diameter = calculate_pipe_diameter(flow_rate, velocity)
|
| 40 |
if diameter:
|
|
|
|
| 44 |
else:
|
| 45 |
st.error("Velocity must be greater than zero.")
|
| 46 |
|
| 47 |
+
# Sidebar for additional information
|
| 48 |
+
st.sidebar.header("About the App")
|
| 49 |
+
st.sidebar.markdown("This application helps you calculate the recommended pipe diameter for a given flow rate and velocity.")
|
| 50 |
st.sidebar.markdown("---")
|
| 51 |
+
st.sidebar.info("Uses basic fluid mechanics principles for pipe sizing calculations.")
|
| 52 |
+
|
| 53 |
+
# Footer
|
| 54 |
+
st.markdown("---")
|
| 55 |
+
st.markdown("**Developed by [Your Name]**")
|
| 56 |
|
| 57 |
if __name__ == "__main__":
|
| 58 |
main()
|
| 59 |
+
|