Spaces:
Sleeping
Sleeping
app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ except Exception as e:
|
|
| 20 |
st.error(f"Error loading question-answering model: {str(e)}")
|
| 21 |
st.stop()
|
| 22 |
|
| 23 |
-
# CSS for styling the navbar and app theme
|
| 24 |
st.markdown(
|
| 25 |
"""
|
| 26 |
<style>
|
|
@@ -33,31 +33,69 @@ st.markdown(
|
|
| 33 |
background-color: #1E1E1E;
|
| 34 |
padding: 20px;
|
| 35 |
}
|
|
|
|
| 36 |
/* Navbar styling */
|
| 37 |
.sidebar .sidebar-content {
|
| 38 |
background-color: #2C3E50;
|
| 39 |
color: white;
|
|
|
|
|
|
|
| 40 |
}
|
| 41 |
.sidebar .sidebar-content a {
|
| 42 |
-
font-size:
|
| 43 |
color: white;
|
|
|
|
| 44 |
}
|
| 45 |
.sidebar .sidebar-content a:hover {
|
| 46 |
color: #F39C12;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
}
|
|
|
|
| 48 |
/* Buttons */
|
| 49 |
.stButton > button {
|
| 50 |
background-color: #2980B9;
|
| 51 |
color: white;
|
| 52 |
-
border:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
.stButton > button:hover {
|
| 55 |
background-color: #1A5276;
|
| 56 |
}
|
|
|
|
| 57 |
/* Input fields */
|
| 58 |
.stTextInput input {
|
| 59 |
border: 1px solid #BDC3C7;
|
| 60 |
border-radius: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
}
|
| 62 |
</style>
|
| 63 |
""",
|
|
@@ -65,6 +103,7 @@ st.markdown(
|
|
| 65 |
)
|
| 66 |
|
| 67 |
# Define the sidebar menu for navigation
|
|
|
|
| 68 |
menu = st.sidebar.radio("Navigation", ["Home", "About Us"])
|
| 69 |
|
| 70 |
# Function to preprocess image
|
|
@@ -164,17 +203,17 @@ if menu == "About Us":
|
|
| 164 |
unsafe_allow_html=True
|
| 165 |
)
|
| 166 |
|
| 167 |
-
# Footer
|
| 168 |
st.markdown(
|
| 169 |
"""
|
| 170 |
-
<
|
| 171 |
-
© 2024 ECG Reader by Hamaad Ayub Khan. All rights reserved.
|
| 172 |
-
<div
|
| 173 |
-
<a href="https://instagram.com/hamaadayubkhan" target="_blank"
|
| 174 |
-
<a href="https://github.com/hakgs1234" target="_blank"
|
| 175 |
-
<a href="https://facebook.com/hamaadayubkhan" target="_blank"
|
| 176 |
</div>
|
| 177 |
-
</
|
| 178 |
""",
|
| 179 |
unsafe_allow_html=True,
|
| 180 |
)
|
|
|
|
| 20 |
st.error(f"Error loading question-answering model: {str(e)}")
|
| 21 |
st.stop()
|
| 22 |
|
| 23 |
+
# CSS for styling the navbar, footer, and app theme
|
| 24 |
st.markdown(
|
| 25 |
"""
|
| 26 |
<style>
|
|
|
|
| 33 |
background-color: #1E1E1E;
|
| 34 |
padding: 20px;
|
| 35 |
}
|
| 36 |
+
|
| 37 |
/* Navbar styling */
|
| 38 |
.sidebar .sidebar-content {
|
| 39 |
background-color: #2C3E50;
|
| 40 |
color: white;
|
| 41 |
+
padding: 20px;
|
| 42 |
+
border-radius: 8px;
|
| 43 |
}
|
| 44 |
.sidebar .sidebar-content a {
|
| 45 |
+
font-size: 20px;
|
| 46 |
color: white;
|
| 47 |
+
text-decoration: none;
|
| 48 |
}
|
| 49 |
.sidebar .sidebar-content a:hover {
|
| 50 |
color: #F39C12;
|
| 51 |
+
text-decoration: underline;
|
| 52 |
+
}
|
| 53 |
+
.sidebar .sidebar-title {
|
| 54 |
+
font-size: 24px;
|
| 55 |
+
font-weight: bold;
|
| 56 |
+
color: #F39C12;
|
| 57 |
+
text-align: center;
|
| 58 |
+
margin-bottom: 20px;
|
| 59 |
}
|
| 60 |
+
|
| 61 |
/* Buttons */
|
| 62 |
.stButton > button {
|
| 63 |
background-color: #2980B9;
|
| 64 |
color: white;
|
| 65 |
+
border: none;
|
| 66 |
+
padding: 10px 20px;
|
| 67 |
+
border-radius: 5px;
|
| 68 |
+
font-size: 16px;
|
| 69 |
+
font-weight: bold;
|
| 70 |
}
|
| 71 |
.stButton > button:hover {
|
| 72 |
background-color: #1A5276;
|
| 73 |
}
|
| 74 |
+
|
| 75 |
/* Input fields */
|
| 76 |
.stTextInput input {
|
| 77 |
border: 1px solid #BDC3C7;
|
| 78 |
border-radius: 5px;
|
| 79 |
+
padding: 10px;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
/* Footer styling */
|
| 83 |
+
footer {
|
| 84 |
+
background-color: #2C3E50;
|
| 85 |
+
padding: 30px;
|
| 86 |
+
text-align: center;
|
| 87 |
+
color: white;
|
| 88 |
+
margin-top: 50px;
|
| 89 |
+
border-radius: 8px;
|
| 90 |
+
font-size: 14px;
|
| 91 |
+
}
|
| 92 |
+
footer a {
|
| 93 |
+
color: #F39C12;
|
| 94 |
+
text-decoration: none;
|
| 95 |
+
margin: 0 10px;
|
| 96 |
+
}
|
| 97 |
+
footer a:hover {
|
| 98 |
+
text-decoration: underline;
|
| 99 |
}
|
| 100 |
</style>
|
| 101 |
""",
|
|
|
|
| 103 |
)
|
| 104 |
|
| 105 |
# Define the sidebar menu for navigation
|
| 106 |
+
st.sidebar.markdown('<div class="sidebar-title">Navigation</div>', unsafe_allow_html=True)
|
| 107 |
menu = st.sidebar.radio("Navigation", ["Home", "About Us"])
|
| 108 |
|
| 109 |
# Function to preprocess image
|
|
|
|
| 203 |
unsafe_allow_html=True
|
| 204 |
)
|
| 205 |
|
| 206 |
+
# Modernized Footer
|
| 207 |
st.markdown(
|
| 208 |
"""
|
| 209 |
+
<footer>
|
| 210 |
+
<p>© 2024 ECG Reader by Hamaad Ayub Khan. All rights reserved.</p>
|
| 211 |
+
<div>
|
| 212 |
+
<a href="https://instagram.com/hamaadayubkhan" target="_blank">Instagram</a>
|
| 213 |
+
<a href="https://github.com/hakgs1234" target="_blank">GitHub</a>
|
| 214 |
+
<a href="https://facebook.com/hamaadayubkhan" target="_blank">Facebook</a>
|
| 215 |
</div>
|
| 216 |
+
</footer>
|
| 217 |
""",
|
| 218 |
unsafe_allow_html=True,
|
| 219 |
)
|