Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,31 +40,6 @@ task = st.sidebar.selectbox("What would you like to do?", [
|
|
| 40 |
"Provide Learning Resources"
|
| 41 |
])
|
| 42 |
|
| 43 |
-
# Sidebar Theme Toggle
|
| 44 |
-
st.sidebar.header("Choose Theme")
|
| 45 |
-
theme = st.sidebar.radio("Theme", ["Light", "Dark"], index=0)
|
| 46 |
-
|
| 47 |
-
# Apply theme styles
|
| 48 |
-
def set_theme(theme):
|
| 49 |
-
if theme == "Dark":
|
| 50 |
-
st.markdown("""
|
| 51 |
-
<style>
|
| 52 |
-
body, .block-container { background-color: #121212; color: #ffffff; }
|
| 53 |
-
[data-testid="stSidebar"] { background-color: #333333; color: white; }
|
| 54 |
-
.stTextArea textarea, .stSelectbox select, .stButton>button { background-color: #444444; color: white; }
|
| 55 |
-
</style>
|
| 56 |
-
""", unsafe_allow_html=True)
|
| 57 |
-
else:
|
| 58 |
-
st.markdown("""
|
| 59 |
-
<style>
|
| 60 |
-
body, .block-container { background-color: #f5f5f5; color: #000000; }
|
| 61 |
-
[data-testid="stSidebar"] { background-color: #ffffff; color: black; }
|
| 62 |
-
.stTextArea textarea, .stSelectbox select, .stButton>button { background-color: #ffffff; color: black; }
|
| 63 |
-
</style>
|
| 64 |
-
""", unsafe_allow_html=True)
|
| 65 |
-
|
| 66 |
-
set_theme(theme)
|
| 67 |
-
|
| 68 |
# Helper functions
|
| 69 |
def extract_text_from_pdf(pdf_file):
|
| 70 |
pdf_reader = PdfReader(pdf_file)
|
|
|
|
| 40 |
"Provide Learning Resources"
|
| 41 |
])
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
# Helper functions
|
| 44 |
def extract_text_from_pdf(pdf_file):
|
| 45 |
pdf_reader = PdfReader(pdf_file)
|