ibrahim313 commited on
Commit
120ab9c
Β·
verified Β·
1 Parent(s): 4e0d894

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -20
app.py CHANGED
@@ -50,12 +50,12 @@ def mental_health_check_in(feelings):
50
  # Initialize session state if not already set
51
  if 'responses' not in st.session_state:
52
  st.session_state['responses'] = {
53
- "personalized_learning_assistant": "",
54
- "ai_coding_mentor": "",
55
- "smart_document_summarizer": "",
56
- "interactive_study_planner": "",
57
- "real_time_qa_support": "",
58
- "mental_health_check_in": ""
59
  }
60
 
61
  # Set up page configuration
@@ -92,7 +92,7 @@ st.markdown("""
92
  color: #ffffff; /* White */
93
  }
94
  .stTextInput::placeholder, .stTextArea::placeholder {
95
- color: #a0a0a0; /* Gray */
96
  }
97
  .stSidebar {
98
  background-color: #000000; /* Royal Black */
@@ -126,22 +126,22 @@ st.markdown("""
126
  </style>
127
  """, unsafe_allow_html=True)
128
 
129
- # Sidebar with tasks
130
  st.sidebar.title("Tasks")
131
  tasks = [
132
- "Personalized Learning Assistant",
133
- "AI Coding Mentor",
134
- "Smart Document Summarizer",
135
- "Interactive Study Planner",
136
- "Real-Time Q&A Support",
137
- "Mental Health Check-In"
138
  ]
139
 
 
140
  selected_task = st.sidebar.radio("Select a task", tasks)
141
 
142
  # Main layout based on selected task
143
  if selected_task == "Personalized Learning Assistant":
144
- st.header("Personalized Learning Assistant")
145
  with st.form(key="personalized_learning_assistant_form"):
146
  topic = st.text_area("Enter the topic you want to learn about")
147
  submit_button = st.form_submit_button("Get Explanation")
@@ -150,7 +150,7 @@ if selected_task == "Personalized Learning Assistant":
150
  st.write(response)
151
 
152
  elif selected_task == "AI Coding Mentor":
153
- st.header("AI Coding Mentor")
154
  with st.form(key="ai_coding_mentor_form"):
155
  code_snippet = st.text_area("Paste your code snippet here")
156
  submit_button = st.form_submit_button("Get Review")
@@ -159,7 +159,7 @@ elif selected_task == "AI Coding Mentor":
159
  st.write(response)
160
 
161
  elif selected_task == "Smart Document Summarizer":
162
- st.header("Smart Document Summarizer")
163
  with st.form(key="smart_document_summarizer_form"):
164
  document_text = st.text_area("Paste your document text here")
165
  submit_button = st.form_submit_button("Get Summary")
@@ -168,7 +168,7 @@ elif selected_task == "Smart Document Summarizer":
168
  st.write(response)
169
 
170
  elif selected_task == "Interactive Study Planner":
171
- st.header("Interactive Study Planner")
172
  with st.form(key="interactive_study_planner_form"):
173
  exam_schedule = st.text_area("Enter your exam schedule here")
174
  submit_button = st.form_submit_button("Create Study Plan")
@@ -177,7 +177,7 @@ elif selected_task == "Interactive Study Planner":
177
  st.write(response)
178
 
179
  elif selected_task == "Real-Time Q&A Support":
180
- st.header("Real-Time Q&A Support")
181
  with st.form(key="real_time_qa_support_form"):
182
  question = st.text_area("Ask your academic question here")
183
  submit_button = st.form_submit_button("Get Answer")
@@ -186,7 +186,7 @@ elif selected_task == "Real-Time Q&A Support":
186
  st.write(response)
187
 
188
  elif selected_task == "Mental Health Check-In":
189
- st.header("Mental Health Check-In")
190
  with st.form(key="mental_health_check_in_form"):
191
  feelings = st.text_area("Share how you are feeling today")
192
  submit_button = st.form_submit_button("Get Advice")
@@ -194,6 +194,7 @@ elif selected_task == "Mental Health Check-In":
194
  response = mental_health_check_in(feelings)
195
  st.write(response)
196
 
 
197
  # Footer
198
  st.markdown("""
199
  <div class="footer">
 
50
  # Initialize session state if not already set
51
  if 'responses' not in st.session_state:
52
  st.session_state['responses'] = {
53
+ "Personalized_learning_assistant": "",
54
+ "Ai_coding_mentor": "",
55
+ "Smart_document_summarizer": "",
56
+ "Interactive_study_planner": "",
57
+ "Real_time_qa_support": "",
58
+ "Mental_health_check_in": ""
59
  }
60
 
61
  # Set up page configuration
 
92
  color: #ffffff; /* White */
93
  }
94
  .stTextInput::placeholder, .stTextArea::placeholder {
95
+ color: black; /* Gray */
96
  }
97
  .stSidebar {
98
  background-color: #000000; /* Royal Black */
 
126
  </style>
127
  """, unsafe_allow_html=True)
128
 
 
129
  st.sidebar.title("Tasks")
130
  tasks = [
131
+ "πŸ“š Personalized Learning Assistant",
132
+ "πŸ€– AI Coding Mentor",
133
+ "πŸ“„ Smart Document Summarizer",
134
+ "πŸ—“οΈ Interactive Study Planner",
135
+ "πŸ’¬ Real-Time Q&A Support",
136
+ "🧠 Mental Health Check-In"
137
  ]
138
 
139
+
140
  selected_task = st.sidebar.radio("Select a task", tasks)
141
 
142
  # Main layout based on selected task
143
  if selected_task == "Personalized Learning Assistant":
144
+ st.subheader("Personalized Learning Assistant")
145
  with st.form(key="personalized_learning_assistant_form"):
146
  topic = st.text_area("Enter the topic you want to learn about")
147
  submit_button = st.form_submit_button("Get Explanation")
 
150
  st.write(response)
151
 
152
  elif selected_task == "AI Coding Mentor":
153
+ st.subheader("AI Coding Mentor")
154
  with st.form(key="ai_coding_mentor_form"):
155
  code_snippet = st.text_area("Paste your code snippet here")
156
  submit_button = st.form_submit_button("Get Review")
 
159
  st.write(response)
160
 
161
  elif selected_task == "Smart Document Summarizer":
162
+ st.subheader("Smart Document Summarizer")
163
  with st.form(key="smart_document_summarizer_form"):
164
  document_text = st.text_area("Paste your document text here")
165
  submit_button = st.form_submit_button("Get Summary")
 
168
  st.write(response)
169
 
170
  elif selected_task == "Interactive Study Planner":
171
+ st.subheader("Interactive Study Planner")
172
  with st.form(key="interactive_study_planner_form"):
173
  exam_schedule = st.text_area("Enter your exam schedule here")
174
  submit_button = st.form_submit_button("Create Study Plan")
 
177
  st.write(response)
178
 
179
  elif selected_task == "Real-Time Q&A Support":
180
+ st.subheader("Real-Time Q&A Support")
181
  with st.form(key="real_time_qa_support_form"):
182
  question = st.text_area("Ask your academic question here")
183
  submit_button = st.form_submit_button("Get Answer")
 
186
  st.write(response)
187
 
188
  elif selected_task == "Mental Health Check-In":
189
+ st.subheader("Mental Health Check-In")
190
  with st.form(key="mental_health_check_in_form"):
191
  feelings = st.text_area("Share how you are feeling today")
192
  submit_button = st.form_submit_button("Get Advice")
 
194
  response = mental_health_check_in(feelings)
195
  st.write(response)
196
 
197
+
198
  # Footer
199
  st.markdown("""
200
  <div class="footer">