Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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()
|