streamlit-md / app.py
slimshadow's picture
Update app.py
3782715 verified
raw
history blame contribute delete
583 Bytes
import streamlit as st
# Define subjects and file paths
subjects = {
"Architecture": "architecture.md",
"Data Structures": "DS.md",
"Operating Systems": "advanceos.md",
"Mathematics": "maths.md",
"C++": "cplusplus.md"
}
# Display the navbar at the top
st.title("Course Syllabus")
subject = st.radio("Select a subject:", list(subjects.keys()), horizontal=True)
# Load and display content based on selection
with open(subjects[subject], "r") as file:
syllabus_content = file.read()
# Render the content
st.markdown(syllabus_content, unsafe_allow_html=True)