Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import cv2
|
| 3 |
+
import mediapipe
|
| 4 |
+
import numpy as np
|
| 5 |
+
|
| 6 |
+
def process_frame(image):
|
| 7 |
+
# image is a frame from the webcam
|
| 8 |
+
# You will process it and return the modified version
|
| 9 |
+
return image
|
| 10 |
+
|
| 11 |
+
gr.Interface(
|
| 12 |
+
fn=process_frame,
|
| 13 |
+
inputs=gr.Image(source="webcam", streaming=True),
|
| 14 |
+
outputs="image",
|
| 15 |
+
live=True
|
| 16 |
+
).launch()
|