Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
#
|
| 4 |
subjects = {
|
| 5 |
"Architecture": "architecture.md",
|
| 6 |
"Data Structures": "DS.md",
|
|
@@ -9,13 +9,13 @@ subjects = {
|
|
| 9 |
"C++": "cplusplus.md"
|
| 10 |
}
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
st.
|
| 14 |
-
subject = st.
|
| 15 |
|
| 16 |
-
#
|
| 17 |
with open(subjects[subject], "r") as file:
|
| 18 |
syllabus_content = file.read()
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
st.
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
# Define subjects and file paths
|
| 4 |
subjects = {
|
| 5 |
"Architecture": "architecture.md",
|
| 6 |
"Data Structures": "DS.md",
|
|
|
|
| 9 |
"C++": "cplusplus.md"
|
| 10 |
}
|
| 11 |
|
| 12 |
+
# Display the navbar at the top
|
| 13 |
+
st.title("Course Syllabus")
|
| 14 |
+
subject = st.radio("Select a subject:", list(subjects.keys()), horizontal=True)
|
| 15 |
|
| 16 |
+
# Load and display content based on selection
|
| 17 |
with open(subjects[subject], "r") as file:
|
| 18 |
syllabus_content = file.read()
|
| 19 |
|
| 20 |
+
# Render the content
|
| 21 |
+
st.markdown(syllabus_content, unsafe_allow_html=True)
|