rashid01 commited on
Commit
42322ca
Β·
verified Β·
1 Parent(s): 35958ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +64 -23
app.py CHANGED
@@ -77,18 +77,37 @@ def get_tips(model_choice, role):
77
  raise ValueError("Unsupported model choice.")
78
 
79
  def start_mock_interview():
80
- # Simulate the mock interview starting process
81
  st.write("### Mock Interview Starting")
82
  st.write("The mock interview is starting now. Please connect with your interviewer.")
83
  st.write("**Interview Timer:**")
84
  countdown_end = datetime.now() + timedelta(minutes=30)
85
- with st.spinner("Preparing your interview..."):
86
- while datetime.now() < countdown_end:
87
- remaining_time = countdown_end - datetime.now()
88
- st.write(f"Time Remaining: {str(remaining_time).split('.')[0]}")
89
- time.sleep(1)
90
- st.write("Mock Interview Session Ended.")
91
- # Update progress data
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  progress_data["mock_interviews_taken"] += 1
93
 
94
  def schedule_mock_interview():
@@ -192,35 +211,49 @@ st.markdown(
192
  margin: 15px 0;
193
  background-color: #e3f2fd;
194
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  </style>
196
  """,
197
  unsafe_allow_html=True
198
  )
199
 
200
- st.title("🎯 Job Interview Preparation Bot")
 
 
 
 
 
201
 
202
- model_choice = st.sidebar.selectbox("Select AI Model", ["Gemini", "OpenAI"], index=0)
203
 
204
- st.header("πŸ“ Generate Interview Questions")
205
- col1, col2 = st.columns(2)
206
- with col1:
207
- role = st.selectbox("Select Role", ["Software Developer", "Data Analyst", "Marketing Manager"])
208
- with col2:
209
- question_type = st.selectbox("Select Question Type", ["Behavioral", "Technical", "Situational"])
210
- with st.expander("Advanced Options"):
211
- difficulty = st.selectbox("Select Difficulty", ["Easy", "Medium", "Hard"])
212
- num_questions = st.slider("Number of Questions", 1, 10, 3)
213
 
 
214
  if st.button("Generate Questions"):
215
  with st.spinner("Generating questions..."):
216
  questions = generate_questions(model_choice, role, question_type, num_questions, difficulty)
217
  st.markdown(style_output("Questions Generated:", "#4CAF50"), unsafe_allow_html=True)
218
  st.write(questions)
219
- # Update progress data
220
- progress_data["questions_solved"][question_type] += num_questions
221
 
222
- st.header("πŸ” Provide Feedback")
223
- answer = st.text_area("Enter Your Answer")
224
  if st.button("Submit Answer"):
225
  if not answer:
226
  st.error("Please enter an answer to receive feedback.")
@@ -247,3 +280,11 @@ with col1:
247
  with col2:
248
  connect_resources()
249
 
 
 
 
 
 
 
 
 
 
77
  raise ValueError("Unsupported model choice.")
78
 
79
  def start_mock_interview():
 
80
  st.write("### Mock Interview Starting")
81
  st.write("The mock interview is starting now. Please connect with your interviewer.")
82
  st.write("**Interview Timer:**")
83
  countdown_end = datetime.now() + timedelta(minutes=30)
84
+
85
+ # Simulate video call window
86
+ st.markdown("""
87
+ <div style="
88
+ width: 100%;
89
+ height: 400px;
90
+ background-color: #000;
91
+ color: #fff;
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ font-size: 24px;
96
+ font-weight: bold;
97
+ border-radius: 8px;
98
+ border: 2px solid #2196F3;
99
+ ">
100
+ <p>Connecting to Interviewer: <br> John Doe</p>
101
+ </div>
102
+ """, unsafe_allow_html=True)
103
+
104
+ while datetime.now() < countdown_end:
105
+ remaining_time = countdown_end - datetime.now()
106
+ if remaining_time <= timedelta(seconds=3):
107
+ st.write(f"**Time Remaining:** {str(remaining_time).split('.')[0]}")
108
+ time.sleep(1)
109
+
110
+ st.write("Mock Interview Session Ended.")
111
  progress_data["mock_interviews_taken"] += 1
112
 
113
  def schedule_mock_interview():
 
211
  margin: 15px 0;
212
  background-color: #e3f2fd;
213
  }
214
+ .sidebar {
215
+ background-color: #ffffff; /* Sidebar background color */
216
+ padding: 1em;
217
+ }
218
+ .footer {
219
+ background-color: #4CAF50;
220
+ color: white;
221
+ text-align: center;
222
+ padding: 1em;
223
+ position: fixed;
224
+ bottom: 0;
225
+ width: 100%;
226
+ border-top: 2px solid #ffffff;
227
+ }
228
  </style>
229
  """,
230
  unsafe_allow_html=True
231
  )
232
 
233
+ # Sidebar for additional links
234
+ with st.sidebar:
235
+ st.title("Menu")
236
+ st.markdown("<h3>About Us</h3><p>We help you prepare for job interviews with simulated questions and feedback.</p>", unsafe_allow_html=True)
237
+ st.markdown("<h3>Sponsored By</h3><p>Your trusted career preparation partner.</p>", unsafe_allow_html=True)
238
+ st.markdown("<h3>Contact Us</h3><p>For support, email us at <a href='mailto:support@example.com'>support@example.com</a>.</p>", unsafe_allow_html=True)
239
 
240
+ st.title("πŸ’Ό Job Interview Preparation Bot")
241
 
242
+ model_choice = st.selectbox("Select AI Model", ["Gemini", "OpenAI"])
243
+ role = st.selectbox("Select Role", ["Software Developer", "Data Analyst", "Marketing Manager"])
244
+ question_type = st.selectbox("Select Question Type", ["Behavioral", "Technical", "Situational"])
245
+ num_questions = st.slider("Number of Questions", 1, 10)
246
+ difficulty = st.selectbox("Select Difficulty Level", ["Easy", "Medium", "Hard"])
 
 
 
 
247
 
248
+ st.header("πŸ“ Generate Interview Questions")
249
  if st.button("Generate Questions"):
250
  with st.spinner("Generating questions..."):
251
  questions = generate_questions(model_choice, role, question_type, num_questions, difficulty)
252
  st.markdown(style_output("Questions Generated:", "#4CAF50"), unsafe_allow_html=True)
253
  st.write(questions)
 
 
254
 
255
+ st.header("πŸ—£οΈ Provide Feedback")
256
+ answer = st.text_area("Submit Your Answer")
257
  if st.button("Submit Answer"):
258
  if not answer:
259
  st.error("Please enter an answer to receive feedback.")
 
280
  with col2:
281
  connect_resources()
282
 
283
+ # Footer
284
+ st.markdown("""
285
+ <div class="footer">
286
+ <p>&copy; 2024 Job Interview Preparation Bot. All rights reserved.</p>
287
+ </div>
288
+ """, unsafe_allow_html=True)
289
+
290
+