Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,15 @@ import gradio as gr
|
|
2 |
import cv2
|
3 |
|
4 |
def greet(image):
|
|
|
|
|
5 |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
6 |
return gray
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
iface = gr.Interface(fn=greet, inputs="image", outputs="image")
|
9 |
iface.launch()
|
|
|
2 |
import cv2
|
3 |
|
4 |
def greet(image):
|
5 |
+
cap = cap = cv2.VideoCapture(video)
|
6 |
+
succes, img = vidcap.read()
|
7 |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
8 |
return gray
|
9 |
+
|
10 |
+
iface = gr.Interface(
|
11 |
+
fn=greet,
|
12 |
+
inputs=gr.Video[source"webcam", format "mp4"
|
13 |
+
outputs="image"
|
14 |
+
)
|
15 |
|
|
|
16 |
iface.launch()
|