Spaces:
Running
Running
Update contact.py
Browse files- contact.py +96 -52
contact.py
CHANGED
@@ -1,55 +1,99 @@
|
|
1 |
import streamlit as st
|
2 |
-
import streamlit.components.v1 as components
|
3 |
|
4 |
def show():
|
5 |
-
|
6 |
-
st.
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
def show():
|
4 |
+
# Custom styles for dark theme and remove top padding
|
5 |
+
st.markdown("""
|
6 |
+
<style>
|
7 |
+
body {
|
8 |
+
background-color: #121212;
|
9 |
+
color: #f1f1f1;
|
10 |
+
}
|
11 |
+
section[data-testid="stSidebar"] + div div[data-testid="stVerticalBlock"] {
|
12 |
+
padding-top: 0rem;
|
13 |
+
}
|
14 |
+
.section-title {
|
15 |
+
font-size: 26px;
|
16 |
+
font-weight: bold;
|
17 |
+
color: #4B8BBE;
|
18 |
+
margin-top: 2rem;
|
19 |
+
}
|
20 |
+
.subsection {
|
21 |
+
font-size: 18px;
|
22 |
+
margin-top: 1rem;
|
23 |
+
}
|
24 |
+
.faq, .glossary, .troubleshoot {
|
25 |
+
background-color: #333333;
|
26 |
+
padding: 1rem;
|
27 |
+
border-radius: 10px;
|
28 |
+
margin-bottom: 1rem;
|
29 |
+
color: #f1f1f1;
|
30 |
+
}
|
31 |
+
.email-box {
|
32 |
+
background-color: #2C3E50;
|
33 |
+
padding: 1rem;
|
34 |
+
border-radius: 10px;
|
35 |
+
color: #f1f1f1;
|
36 |
+
}
|
37 |
+
.st-expanderHeader {
|
38 |
+
color: #4B8BBE;
|
39 |
+
}
|
40 |
+
.st-expanderContent {
|
41 |
+
color: #f1f1f1;
|
42 |
+
}
|
43 |
+
</style>
|
44 |
+
""", unsafe_allow_html=True)
|
45 |
+
|
46 |
+
# Page title
|
47 |
+
st.title("π Help & Support - TransPolymer")
|
48 |
+
|
49 |
+
st.markdown("<div class='section-title'>β Help Center - TransPolymer</div>", unsafe_allow_html=True)
|
50 |
+
st.markdown("Welcome to the **TransPolymer Help Page**. This guide will walk you through how to use the app effectively.")
|
51 |
+
|
52 |
+
# 1. Getting Started
|
53 |
+
st.markdown("<div class='section-title'>π Getting Started</div>", unsafe_allow_html=True)
|
54 |
+
st.markdown("""
|
55 |
+
- **Step 1:** Go to the **Prediction** page.
|
56 |
+
- **Step 2:** Enter a valid **SMILES string** or choose a polymer from the dropdown.
|
57 |
+
- **Step 3:** Click **Predict** to see the results.
|
58 |
+
- The app will return **six polymer properties** based on your input.
|
59 |
+
""")
|
60 |
+
|
61 |
+
# 2. FAQ
|
62 |
+
st.markdown("<div class='section-title'>π Frequently Asked Questions</div>", unsafe_allow_html=True)
|
63 |
+
with st.expander("𧬠What is a SMILES format?"):
|
64 |
+
st.markdown("SMILES (Simplified Molecular Input Line Entry System) is a line notation for describing molecular structures using short ASCII strings.")
|
65 |
+
with st.expander("β What if I enter an invalid SMILES string?"):
|
66 |
+
st.markdown("The system will show an error if the SMILES string is incorrectly formatted or contains special characters.")
|
67 |
+
|
68 |
+
# 3. Glossary / Terminology
|
69 |
+
st.markdown("<div class='section-title'>π Glossary</div>", unsafe_allow_html=True)
|
70 |
+
with st.container():
|
71 |
+
st.markdown("""
|
72 |
+
- **Tensile Strength (MPa):** The maximum stress a material can withstand while being stretched or pulled before breaking.
|
73 |
+
- **Ionization Energy (eV):** The energy required to remove an electron from a molecule or atom in its gaseous state. Higher values indicate more stability.
|
74 |
+
- **Electron Affinity (eV):** The amount of energy released when an electron is added to a molecule or atom.
|
75 |
+
- **logP:** The logarithm of the partition coefficient between octanol and water, indicating the compound's hydrophobicity.
|
76 |
+
- **Refractive Index:** A measure of how much light bends (or refracts) when passing through a material.
|
77 |
+
- **Molecular Weight (g/mol):** The mass of one mole of a substanceβs molecules, calculated as the sum of atomic weights.
|
78 |
+
""")
|
79 |
+
|
80 |
+
# 4. Troubleshooting Tips
|
81 |
+
st.markdown("<div class='section-title'>π οΈ Troubleshooting</div>", unsafe_allow_html=True)
|
82 |
+
with st.container():
|
83 |
+
st.markdown("""
|
84 |
+
- β **Common Mistakes**:
|
85 |
+
- Extra spaces in SMILES strings
|
86 |
+
- Using unsupported or uncommon formats
|
87 |
+
- π **To Refresh**: Press `Ctrl+R` or click the "Rerun" button if something goes wrong.
|
88 |
+
""")
|
89 |
+
|
90 |
+
# 5. Support
|
91 |
+
st.markdown("<div class='section-title'>π¬ Support</div>", unsafe_allow_html=True)
|
92 |
+
st.markdown("""
|
93 |
+
For further help, reach us at π§ **transpolymer365@gmail.com**
|
94 |
+
Or report issues on [GitHub](https://github.com/your-username/transpolymer/issues)
|
95 |
+
""")
|
96 |
+
|
97 |
+
# Run this file directly for testing
|
98 |
+
if __name__ == "__main__":
|
99 |
+
show()
|