Spaces:
Runtime error
Runtime error
Commit
·
fd182e6
0
Parent(s):
first commit
Browse files- .gitignore +2 -0
- README.md +0 -0
- app.py +23 -0
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
flagged/
|
2 |
+
.vscode/
|
README.md
ADDED
File without changes
|
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import cv2
|
2 |
+
|
3 |
+
import gradio as gr
|
4 |
+
import mediapipe as mp
|
5 |
+
import numpy as np
|
6 |
+
|
7 |
+
mp_drawing = mp.solutions.drawing_utils
|
8 |
+
mp_selfie_segmentation = mp.solutions.selfie_segmentation
|
9 |
+
|
10 |
+
|
11 |
+
def snap(video):
|
12 |
+
print(video)
|
13 |
+
return video
|
14 |
+
|
15 |
+
|
16 |
+
demo = gr.Interface(
|
17 |
+
fn=snap,
|
18 |
+
inputs=gr.Video(sources=["webcam"]),
|
19 |
+
outputs=["video"],
|
20 |
+
)
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
demo.launch()
|