MarcosRodrigo commited on
Commit
69b8881
·
verified ·
1 Parent(s): da3627f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # A simple function to just display the live video feed
4
+ def show_live_webcam(image):
5
+ return image
6
+
7
+ # Create a Gradio Interface for the webcam feed
8
+ webcam_interface = gr.Interface(
9
+ fn=show_live_webcam,
10
+ inputs=gr.Image(source="webcam", streaming=True),
11
+ outputs="image",
12
+ title="Live Webcam Feed",
13
+ description="Displays the live feed from your webcam."
14
+ )
15
+
16
+ # Launch the Gradio app
17
+ webcam_interface.launch()