harshitface2003 commited on
Commit
6aedf14
·
verified ·
1 Parent(s): 37d0ed4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -1,12 +1,15 @@
1
  import gradio as gr
2
 
3
- with gr.Blocks() as demo:
4
- with gr.Row():
5
- with gr.Column():
6
- input_img = gr.Image(label="Input", sources="webcam")
7
- with gr.Column():
8
- output_img = gr.Image(label="Output")
9
- input_img.stream(lambda s: s, input_img, output_img, time_limit=15, stream_every=0.1, concurrency_limit=30)
 
 
 
10
 
11
  if __name__ == "__main__":
12
- demo.launch()
 
1
  import gradio as gr
2
 
3
+ def webcam(video0,video1):
4
+ return video0,video1
5
+
6
+ interface = gr.Interface(
7
+ fn=webcam,
8
+ inputs=[gr.Webcam(mirror_webcam=False,streaming=True),
9
+ gr.Webcam(mirror_webcam=True,streaming=True),
10
+ ],
11
+ outputs=["image","image"],
12
+ )
13
 
14
  if __name__ == "__main__":
15
+ interface.launch()