neerajkalyank commited on
Commit
eb79913
·
verified ·
1 Parent(s): 0e101bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -286,10 +286,10 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".small-hint{font-size:12px;opacity:.
286
  input_source = gr.Radio(["Upload", "Webcam"], value="Upload", label="Input Source")
287
  upload_col = gr.Column(visible=True)
288
  with upload_col:
289
- upload_img = gr.Image(type="pil", label="📷 Upload Your Photo (front‑facing)")
290
  webcam_col = gr.Column(visible=False)
291
  with webcam_col:
292
- webcam_img = gr.Image(source="webcam", type="pil", label="📹 Live Webcam")
293
 
294
  gender_filter = gr.Dropdown(choices=["All", "Male", "Female"], value="All", label="🎭 Filter by Gender")
295
 
@@ -353,4 +353,4 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".small-hint{font-size:12px;opacity:.
353
  # Limit concurrency to avoid MediaPipe thread issues, enable queue for responsiveness
354
  if __name__ == "__main__":
355
  demo.queue(concurrency_count=1)
356
- demo.launch()
 
286
  input_source = gr.Radio(["Upload", "Webcam"], value="Upload", label="Input Source")
287
  upload_col = gr.Column(visible=True)
288
  with upload_col:
289
+ upload_img = gr.Image(sources=["upload"], type="pil", label="📷 Upload Your Photo (front‑facing)")
290
  webcam_col = gr.Column(visible=False)
291
  with webcam_col:
292
+ webcam_img = gr.Image(sources=["webcam"], type="pil", label="📹 Live Webcam", streaming=True)
293
 
294
  gender_filter = gr.Dropdown(choices=["All", "Male", "Female"], value="All", label="🎭 Filter by Gender")
295
 
 
353
  # Limit concurrency to avoid MediaPipe thread issues, enable queue for responsiveness
354
  if __name__ == "__main__":
355
  demo.queue(concurrency_count=1)
356
+ demo.launch()