Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,49 +1,77 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
st.
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
"
|
| 36 |
-
|
| 37 |
-
)
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
# App title and introduction
|
| 4 |
+
st.title("Understanding Melting and Boiling Points of Matter")
|
| 5 |
+
st.subheader("Learn about the fundamental properties of matter!")
|
| 6 |
+
|
| 7 |
+
st.markdown("""
|
| 8 |
+
Matter exists in different states: **solids**, **liquids**, **gases**, and **plasma**.
|
| 9 |
+
Each state has unique properties influenced by temperature and pressure.
|
| 10 |
+
In this app, we explore the **melting points** and **boiling points** of various substances and states of matter.
|
| 11 |
+
""")
|
| 12 |
+
|
| 13 |
+
# Sidebar for navigation
|
| 14 |
+
st.sidebar.title("Navigation")
|
| 15 |
+
option = st.sidebar.radio("Choose a category", ("Introduction", "Solids", "Liquids", "Gases", "Plasma"))
|
| 16 |
+
|
| 17 |
+
if option == "Introduction":
|
| 18 |
+
st.header("Introduction to Melting and Boiling Points")
|
| 19 |
+
st.write("""
|
| 20 |
+
- **Melting Point**: The temperature at which a solid turns into a liquid.
|
| 21 |
+
- **Boiling Point**: The temperature at which a liquid turns into a gas.
|
| 22 |
+
|
| 23 |
+
These points depend on intermolecular forces, pressure, and the type of matter.
|
| 24 |
+
""")
|
| 25 |
+
|
| 26 |
+
st.info("Fun Fact: The boiling point of water is 100°C at sea level but decreases at higher altitudes due to lower atmospheric pressure!")
|
| 27 |
+
|
| 28 |
+
elif option == "Solids":
|
| 29 |
+
st.header("Melting and Boiling Points of Solids")
|
| 30 |
+
st.write("""
|
| 31 |
+
Solids have strong intermolecular forces, resulting in high melting and boiling points. Examples include:
|
| 32 |
+
- **Iron**: Melting Point = 1,538°C, Boiling Point = 2,862°C
|
| 33 |
+
- **Gold**: Melting Point = 1,064°C, Boiling Point = 2,700°C
|
| 34 |
+
- **Ice (H₂O)**: Melting Point = 0°C, Boiling Point = 100°C (when melted to water)
|
| 35 |
+
""")
|
| 36 |
+
|
| 37 |
+
st.image("https://upload.wikimedia.org/wikipedia/commons/3/38/Crystalline_Structure.jpg", caption="Crystalline Structure of Solids", use_column_width=True)
|
| 38 |
+
|
| 39 |
+
elif option == "Liquids":
|
| 40 |
+
st.header("Melting and Boiling Points of Liquids")
|
| 41 |
+
st.write("""
|
| 42 |
+
Liquids have moderate intermolecular forces, leading to relatively lower boiling points compared to solids. Examples include:
|
| 43 |
+
- **Water**: Boiling Point = 100°C
|
| 44 |
+
- **Mercury**: Boiling Point = 356.7°C
|
| 45 |
+
- **Ethanol**: Boiling Point = 78.37°C
|
| 46 |
+
""")
|
| 47 |
+
|
| 48 |
+
st.image("https://upload.wikimedia.org/wikipedia/commons/d/d4/Surface_Tension.jpg", caption="Surface Tension in Liquids", use_column_width=True)
|
| 49 |
+
|
| 50 |
+
elif option == "Gases":
|
| 51 |
+
st.header("Boiling Points of Gases")
|
| 52 |
+
st.write("""
|
| 53 |
+
Gases have very weak intermolecular forces. Examples include:
|
| 54 |
+
- **Oxygen (O₂)**: Boiling Point = -183°C
|
| 55 |
+
- **Nitrogen (N₂)**: Boiling Point = -196°C
|
| 56 |
+
- **Helium (He)**: Boiling Point = -268.9°C
|
| 57 |
+
""")
|
| 58 |
+
|
| 59 |
+
st.image("https://upload.wikimedia.org/wikipedia/commons/3/31/Helium-filled_balloon.jpg", caption="Helium Balloon", use_column_width=True)
|
| 60 |
+
|
| 61 |
+
elif option == "Plasma":
|
| 62 |
+
st.header("Understanding Plasma")
|
| 63 |
+
st.write("""
|
| 64 |
+
Plasma is a state of matter where gases are ionized, creating free electrons and ions. It doesn't have traditional melting or boiling points but exists at very high temperatures.
|
| 65 |
+
|
| 66 |
+
Examples:
|
| 67 |
+
- **Sun's Core**: Millions of degrees Celsius
|
| 68 |
+
- **Lightning**: Around 30,000°C
|
| 69 |
+
""")
|
| 70 |
+
|
| 71 |
+
st.image("https://upload.wikimedia.org/wikipedia/commons/a/a9/Plasma_globe_60th.jpg", caption="Plasma Globe", use_column_width=True)
|
| 72 |
+
|
| 73 |
+
# Footer
|
| 74 |
+
st.markdown("---")
|
| 75 |
+
st.markdown("Developed with ❤️ using [Streamlit](https://streamlit.io/) and deployed on [Hugging Face](https://huggingface.co).")
|
| 76 |
+
|
| 77 |
|