github-actions[bot] commited on
Commit
f7d6ff2
·
1 Parent(s): 0b47132

Deploy from GitHub - 2026-01-19 23:56:35

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -2487,7 +2487,6 @@ with gr.Blocks(
2487
 
2488
  webcam_stream = gr.Image(
2489
  sources=["webcam"],
2490
- streaming=True,
2491
  label="Webcam Feed",
2492
  height=400
2493
  )
@@ -2498,9 +2497,8 @@ with gr.Blocks(
2498
 
2499
  with gr.Column(scale=1):
2500
  webcam_output = gr.Image(
2501
- label="Stylized Output (Live)",
2502
- height=400,
2503
- streaming=True
2504
  )
2505
 
2506
  webcam_stats = gr.Markdown(
@@ -2769,8 +2767,9 @@ with gr.Blocks(
2769
  outputs=[blend_style2]
2770
  )
2771
 
2772
- # Webcam handlers
2773
- webcam_stream.stream(
 
2774
  fn=process_webcam_frame,
2775
  inputs=[webcam_stream, webcam_style, webcam_backend],
2776
  outputs=[webcam_output],
@@ -2800,8 +2799,7 @@ with gr.Blocks(
2800
 
2801
  if __name__ == "__main__":
2802
  demo.launch(
2803
- # Required for HuggingFace Spaces deployment
2804
- share=True,
2805
- # Explicitly enable API for Gradio 5.x compatibility
2806
- show_api=True
2807
  )
 
2487
 
2488
  webcam_stream = gr.Image(
2489
  sources=["webcam"],
 
2490
  label="Webcam Feed",
2491
  height=400
2492
  )
 
2497
 
2498
  with gr.Column(scale=1):
2499
  webcam_output = gr.Image(
2500
+ label="Stylized Output",
2501
+ height=400
 
2502
  )
2503
 
2504
  webcam_stats = gr.Markdown(
 
2767
  outputs=[blend_style2]
2768
  )
2769
 
2770
+ # Webcam handlers - note: streaming disabled for Gradio 5.x compatibility
2771
+ # Users can still upload/process webcam images manually
2772
+ webcam_stream.change(
2773
  fn=process_webcam_frame,
2774
  inputs=[webcam_stream, webcam_style, webcam_backend],
2775
  outputs=[webcam_output],
 
2799
 
2800
  if __name__ == "__main__":
2801
  demo.launch(
2802
+ # share=True is not supported on HuggingFace Spaces
2803
+ # show_api=True can cause issues with some gradio_client versions
2804
+ show_api=False
 
2805
  )