Spaces:
Sleeping
Sleeping
ahmad-fakhar
commited on
Commit
•
f550dd1
1
Parent(s):
576e56c
Update app.py
Browse files
app.py
CHANGED
@@ -90,55 +90,55 @@ st.set_page_config(page_title="EduNexus", page_icon=":book:", layout="wide")
|
|
90 |
st.markdown("""
|
91 |
<style>
|
92 |
.css-1o7k8tt {
|
93 |
-
background-color: #
|
94 |
-
color: #
|
95 |
}
|
96 |
.css-1o7k8tt h1 {
|
97 |
-
color: #
|
98 |
}
|
99 |
.stButton {
|
100 |
-
background-color: #
|
101 |
-
color: #
|
102 |
-
border-radius:
|
103 |
-
padding:
|
104 |
-
font-size:
|
105 |
}
|
106 |
.stButton:hover {
|
107 |
-
background-color: #
|
108 |
}
|
109 |
.stTextInput, .stTextArea {
|
110 |
-
border: 1px solid #
|
111 |
-
border-radius:
|
112 |
-
background-color: #
|
113 |
-
color: #
|
114 |
}
|
115 |
.stTextInput::placeholder, .stTextArea::placeholder {
|
116 |
-
color: #
|
117 |
}
|
118 |
.stSidebar {
|
119 |
-
background-color: #
|
120 |
}
|
121 |
.stSidebar .stMarkdown {
|
122 |
-
color: #
|
123 |
}
|
124 |
.footer {
|
125 |
-
background-color: #
|
126 |
padding: 10px;
|
127 |
text-align: center;
|
128 |
-
color: #
|
129 |
-
border-top: 1px solid #
|
130 |
}
|
131 |
.footer a {
|
132 |
-
color: #
|
133 |
margin: 0 10px;
|
134 |
text-decoration: none;
|
135 |
-
font-size:
|
136 |
}
|
137 |
.footer a:hover {
|
138 |
-
color: #
|
139 |
}
|
140 |
.footer i {
|
141 |
-
font-size:
|
142 |
}
|
143 |
</style>
|
144 |
""", unsafe_allow_html=True)
|
@@ -202,8 +202,8 @@ elif selected_tool == "AI Coding Mentor":
|
|
202 |
|
203 |
elif selected_tool == "Smart Document Summarizer":
|
204 |
st.header("Smart Document Summarizer")
|
205 |
-
with st.form(key="
|
206 |
-
document_input = st.text_area("Paste your document text
|
207 |
submit_button = st.form_submit_button("Summarize Document")
|
208 |
if submit_button:
|
209 |
summary = smart_document_summarizer(document_input)
|
@@ -214,18 +214,18 @@ elif selected_tool == "Smart Document Summarizer":
|
|
214 |
elif selected_tool == "Interactive Study Planner":
|
215 |
st.header("Interactive Study Planner")
|
216 |
with st.form(key="planner_form"):
|
217 |
-
schedule_input = st.
|
218 |
submit_button = st.form_submit_button("Create Study Plan")
|
219 |
if submit_button:
|
220 |
-
|
221 |
-
st.session_state['responses']['interactive_study_planner'] =
|
222 |
if st.session_state['responses']['interactive_study_planner']:
|
223 |
display_response("interactive_study_planner", st.session_state['responses']['interactive_study_planner'])
|
224 |
|
225 |
elif selected_tool == "Real-Time Q&A Support":
|
226 |
st.header("Real-Time Q&A Support")
|
227 |
with st.form(key="qa_form"):
|
228 |
-
question_input = st.text_input("Ask
|
229 |
submit_button = st.form_submit_button("Get Answer")
|
230 |
if submit_button:
|
231 |
answer = real_time_qa_support(question_input)
|
@@ -236,20 +236,19 @@ elif selected_tool == "Real-Time Q&A Support":
|
|
236 |
elif selected_tool == "Mental Health Check-In":
|
237 |
st.header("Mental Health Check-In")
|
238 |
with st.form(key="mental_health_form"):
|
239 |
-
feelings_input = st.text_area("
|
240 |
-
submit_button = st.form_submit_button("Get
|
241 |
if submit_button:
|
242 |
advice = mental_health_check_in(feelings_input)
|
243 |
st.session_state['responses']['mental_health_check_in'] = advice
|
244 |
if st.session_state['responses']['mental_health_check_in']:
|
245 |
display_response("mental_health_check_in", st.session_state['responses']['mental_health_check_in'])
|
246 |
|
247 |
-
#
|
248 |
st.markdown("""
|
249 |
<div class="footer">
|
250 |
-
<
|
251 |
-
<a href="https://
|
252 |
-
<a href="https://
|
253 |
-
<a href="mailto:[email protected]"><i class="fas fa-envelope"></i></a>
|
254 |
</div>
|
255 |
""", unsafe_allow_html=True)
|
|
|
90 |
st.markdown("""
|
91 |
<style>
|
92 |
.css-1o7k8tt {
|
93 |
+
background-color: #f5f5f5;
|
94 |
+
color: #333333;
|
95 |
}
|
96 |
.css-1o7k8tt h1 {
|
97 |
+
color: #333333;
|
98 |
}
|
99 |
.stButton {
|
100 |
+
background-color: #007bff;
|
101 |
+
color: #ffffff;
|
102 |
+
border-radius: 5px;
|
103 |
+
padding: 8px 16px;
|
104 |
+
font-size: 14px;
|
105 |
}
|
106 |
.stButton:hover {
|
107 |
+
background-color: #0056b3;
|
108 |
}
|
109 |
.stTextInput, .stTextArea {
|
110 |
+
border: 1px solid #ced4da;
|
111 |
+
border-radius: 4px;
|
112 |
+
background-color: #ffffff;
|
113 |
+
color: #333333;
|
114 |
}
|
115 |
.stTextInput::placeholder, .stTextArea::placeholder {
|
116 |
+
color: #6c757d;
|
117 |
}
|
118 |
.stSidebar {
|
119 |
+
background-color: #ffffff;
|
120 |
}
|
121 |
.stSidebar .stMarkdown {
|
122 |
+
color: #333333;
|
123 |
}
|
124 |
.footer {
|
125 |
+
background-color: #f5f5f5;
|
126 |
padding: 10px;
|
127 |
text-align: center;
|
128 |
+
color: #333333;
|
129 |
+
border-top: 1px solid #dee2e6;
|
130 |
}
|
131 |
.footer a {
|
132 |
+
color: #007bff;
|
133 |
margin: 0 10px;
|
134 |
text-decoration: none;
|
135 |
+
font-size: 16px;
|
136 |
}
|
137 |
.footer a:hover {
|
138 |
+
color: #0056b3;
|
139 |
}
|
140 |
.footer i {
|
141 |
+
font-size: 18px;
|
142 |
}
|
143 |
</style>
|
144 |
""", unsafe_allow_html=True)
|
|
|
202 |
|
203 |
elif selected_tool == "Smart Document Summarizer":
|
204 |
st.header("Smart Document Summarizer")
|
205 |
+
with st.form(key="document_form"):
|
206 |
+
document_input = st.text_area("Paste your document text", placeholder="e.g., In this paper, we explore the...")
|
207 |
submit_button = st.form_submit_button("Summarize Document")
|
208 |
if submit_button:
|
209 |
summary = smart_document_summarizer(document_input)
|
|
|
214 |
elif selected_tool == "Interactive Study Planner":
|
215 |
st.header("Interactive Study Planner")
|
216 |
with st.form(key="planner_form"):
|
217 |
+
schedule_input = st.text_input("Describe your exam schedule", placeholder="e.g., 3 exams next week")
|
218 |
submit_button = st.form_submit_button("Create Study Plan")
|
219 |
if submit_button:
|
220 |
+
plan = interactive_study_planner(schedule_input)
|
221 |
+
st.session_state['responses']['interactive_study_planner'] = plan
|
222 |
if st.session_state['responses']['interactive_study_planner']:
|
223 |
display_response("interactive_study_planner", st.session_state['responses']['interactive_study_planner'])
|
224 |
|
225 |
elif selected_tool == "Real-Time Q&A Support":
|
226 |
st.header("Real-Time Q&A Support")
|
227 |
with st.form(key="qa_form"):
|
228 |
+
question_input = st.text_input("Ask your question", placeholder="e.g., What is Newton's third law?")
|
229 |
submit_button = st.form_submit_button("Get Answer")
|
230 |
if submit_button:
|
231 |
answer = real_time_qa_support(question_input)
|
|
|
236 |
elif selected_tool == "Mental Health Check-In":
|
237 |
st.header("Mental Health Check-In")
|
238 |
with st.form(key="mental_health_form"):
|
239 |
+
feelings_input = st.text_area("Describe how you're feeling", placeholder="e.g., I'm feeling stressed about exams")
|
240 |
+
submit_button = st.form_submit_button("Get Support")
|
241 |
if submit_button:
|
242 |
advice = mental_health_check_in(feelings_input)
|
243 |
st.session_state['responses']['mental_health_check_in'] = advice
|
244 |
if st.session_state['responses']['mental_health_check_in']:
|
245 |
display_response("mental_health_check_in", st.session_state['responses']['mental_health_check_in'])
|
246 |
|
247 |
+
# Footer with social links
|
248 |
st.markdown("""
|
249 |
<div class="footer">
|
250 |
+
<a href="https://github.com/" target="_blank"><i class="fab fa-github"></i> GitHub</a>
|
251 |
+
<a href="https://linkedin.com/" target="_blank"><i class="fab fa-linkedin"></i> LinkedIn</a>
|
252 |
+
<a href="https://twitter.com/" target="_blank"><i class="fab fa-twitter"></i> Twitter</a>
|
|
|
253 |
</div>
|
254 |
""", unsafe_allow_html=True)
|