maahikachitagi commited on
Commit
3d3d0cb
·
verified ·
1 Parent(s): 38f6d45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -26
app.py CHANGED
@@ -165,31 +165,38 @@ with gr.Blocks(css="""
165
  }
166
  .gr-chatbot { background-color: white; border-radius: 15px; padding: 20px; }
167
  .custom-tabs .tab-nav {
168
- background-color: #f9f9f7;
169
- border-radius: 15px;
170
- padding: 5px;
171
  display: flex;
172
  justify-content: center;
 
 
 
173
  }
174
- .custom-tabs button[role="tab"] {
175
- border-radius: 12px !important;
176
- padding: 10px 24px !important;
177
- margin: 4px !important;
178
- font-weight: 500;
179
- font-size: 16px;
180
- color: #888 !important;
181
- background-color: #ffffff;
182
- border: none !important;
183
- transition: 0.3s ease;
184
- }
185
- .custom-tabs button[role="tab"][aria-selected="true"] {
186
- background-color: #f0f0eb !important;
187
- color: #333 !important;
188
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
189
- }
190
- .custom-tabs button[role="tab"]:hover {
191
- background-color: #ecece8 !important;
192
- }
 
 
 
 
193
  :root {
194
  --trim-region-color: rgba(255, 153, 0, 0.5); /* Nice orange for example */
195
 
@@ -233,7 +240,7 @@ with gr.Blocks(css="""
233
 
234
  gr.Markdown("""
235
  <div style='width: 100%; text-align: center;'>
236
- <img src="https://cdn-uploads.huggingface.co/production/uploads/6841b10b397a67a7c7a39b89/MdYcoR3PmfLgLLof_NFL7.png" style="width: 100%; height: auto; object-fit: contain;">
237
  </div>
238
  """)
239
  #https://cdn-uploads.huggingface.co/production/uploads/6841b10b397a67a7c7a39b89/MTR_dMHte-RCIbyujLW83.png
@@ -245,6 +252,7 @@ with gr.Blocks(css="""
245
 
246
 
247
 
 
248
  user_profile = gr.State({"interview_type": "", "field": "", "interview_in_progress": False})
249
  chat_history = gr.State([])
250
 
@@ -300,20 +308,20 @@ with gr.Blocks(css="""
300
  with gr.Column(elem_classes=["custom-tabs"]):
301
  with gr.Tabs():
302
 
303
- with gr.Tab('<img src="https://cdn-uploads.huggingface.co/production/uploads/6841b10b397a67a7c7a39b89/pVS-KWvRlW96VKa34EZeZ.png" style="width:24px;height:24px;"> Text Mode'):
304
  chatbot_text = gr.Chatbot(label="Interview Chat (Text Mode)", type="messages")
305
  msg = gr.Textbox(label="Type 'start' to begin")
306
  send_btn = gr.Button("Send")
307
  send_btn.click(respond, inputs=[msg, chat_history, user_profile], outputs=[chatbot_text], queue=False)
308
  send_btn.click(lambda: "", None, msg, queue=False)
309
 
310
- with gr.Tab("🎙️ Audio Mode"):
311
  chatbot_audio = gr.Chatbot(label="Interview Chat (Audio Mode)", type="messages")
312
  audio_input = gr.Audio(type="filepath", label="Record Your Answer")
313
  audio_btn = gr.Button("Send Audio")
314
  audio_btn.click(handle_audio, inputs=[audio_input, chat_history, user_profile], outputs=[chatbot_audio], queue=False)
315
 
316
- with gr.Tab("📸 Webcam Mode"):
317
  img_upload = gr.Image(type="pil", label="Upload an Image")
318
  posture_output = gr.Textbox(label="Posture Feedback")
319
  posture_btn = gr.Button("Analyze Posture")
 
165
  }
166
  .gr-chatbot { background-color: white; border-radius: 15px; padding: 20px; }
167
  .custom-tabs .tab-nav {
168
+ background-color: #ffffff;
169
+ border-radius: 50px;
170
+ padding: 8px;
171
  display: flex;
172
  justify-content: center;
173
+ gap: 8px;
174
+ border: 1px solid #e0e0e0;
175
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
176
  }
177
+
178
+ .custom-tabs button[role="tab"] {
179
+ border-radius: 50px !important;
180
+ padding: 10px 30px !important;
181
+ font-weight: 500;
182
+ font-size: 16px;
183
+ color: #555 !important;
184
+ background-color: transparent;
185
+ border: none;
186
+ transition: 0.25s ease;
187
+ }
188
+
189
+ .custom-tabs button[role="tab"][aria-selected="true"] {
190
+ background-color: #b3f0ff;
191
+ color: #222 !important;
192
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
193
+ }
194
+
195
+ .custom-tabs button[role="tab"]:hover {
196
+ background-color: #e0f7ff;
197
+ transform: scale(1.05);
198
+ }
199
+
200
  :root {
201
  --trim-region-color: rgba(255, 153, 0, 0.5); /* Nice orange for example */
202
 
 
240
 
241
  gr.Markdown("""
242
  <div style='width: 100%; text-align: center;'>
243
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6841b10b397a67a7c7a39b89/iudiYIVkr1ZcAqpEWaW3Z.png" style="width: 100%; height: auto; object-fit: contain;">
244
  </div>
245
  """)
246
  #https://cdn-uploads.huggingface.co/production/uploads/6841b10b397a67a7c7a39b89/MTR_dMHte-RCIbyujLW83.png
 
252
 
253
 
254
 
255
+
256
  user_profile = gr.State({"interview_type": "", "field": "", "interview_in_progress": False})
257
  chat_history = gr.State([])
258
 
 
308
  with gr.Column(elem_classes=["custom-tabs"]):
309
  with gr.Tabs():
310
 
311
+ with gr.Tab('Text Mode'):
312
  chatbot_text = gr.Chatbot(label="Interview Chat (Text Mode)", type="messages")
313
  msg = gr.Textbox(label="Type 'start' to begin")
314
  send_btn = gr.Button("Send")
315
  send_btn.click(respond, inputs=[msg, chat_history, user_profile], outputs=[chatbot_text], queue=False)
316
  send_btn.click(lambda: "", None, msg, queue=False)
317
 
318
+ with gr.Tab("Audio Mode"):
319
  chatbot_audio = gr.Chatbot(label="Interview Chat (Audio Mode)", type="messages")
320
  audio_input = gr.Audio(type="filepath", label="Record Your Answer")
321
  audio_btn = gr.Button("Send Audio")
322
  audio_btn.click(handle_audio, inputs=[audio_input, chat_history, user_profile], outputs=[chatbot_audio], queue=False)
323
 
324
+ with gr.Tab("Webcam Mode"):
325
  img_upload = gr.Image(type="pil", label="Upload an Image")
326
  posture_output = gr.Textbox(label="Posture Feedback")
327
  posture_btn = gr.Button("Analyze Posture")