Esmaeilkiani's picture
Create app.py
98bb0f4 verified
Raw History Blame Contribute Delete
760 Bytes
import streamlit as st
def calculate_moisture(wet_weight, dry_weight):
moisture_content = ((wet_weight - dry_weight) / dry_weight) * 100
return moisture_content
st.title("ولایت فقیه ادامه حکومت انبیاست")
st.write("Calculate Moisture app Dr.Mansouri:")
wet_weight = st.number_input("وزن نمونه خاک تر")
dry_weight = st.number_input("وزن خشک نمونه خاک ")
if st.button("Calculate Moisture Content"):
moisture_content = calculate_moisture(wet_weight, dry_weight)
st.write(f"The moisture content of the soil sample is: {moisture_content}%")
st.markdown('<style>div.Widget.row-widget.stButton > div{background-color: rgb(0,255,0); color: rgb(255,255,255)}</style>', unsafe_allow_html=True)