Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,10 +9,10 @@ from transparent_background import Remover
|
|
| 9 |
|
| 10 |
@spaces.GPU
|
| 11 |
def doo(video, mode):
|
| 12 |
-
if(mode == 'Normal'):
|
| 13 |
-
|
| 14 |
-
if(mode == 'Fast'):
|
| 15 |
-
|
| 16 |
cap = cv2.VideoCapture(video)
|
| 17 |
fps = cap.get(cv2.CAP_PROP_FPS)
|
| 18 |
|
|
@@ -48,5 +48,5 @@ def doo(video, mode):
|
|
| 48 |
writer.release()
|
| 49 |
return 'output.mp4'
|
| 50 |
|
| 51 |
-
iface = gr.Interface(fn=doo,
|
| 52 |
iface.launch()
|
|
|
|
| 9 |
|
| 10 |
@spaces.GPU
|
| 11 |
def doo(video, mode):
|
| 12 |
+
#if(mode == 'Normal'):
|
| 13 |
+
# remover = Remover()
|
| 14 |
+
#if(mode == 'Fast'):
|
| 15 |
+
remover = Remover(mode='fast')
|
| 16 |
cap = cv2.VideoCapture(video)
|
| 17 |
fps = cap.get(cv2.CAP_PROP_FPS)
|
| 18 |
|
|
|
|
| 48 |
writer.release()
|
| 49 |
return 'output.mp4'
|
| 50 |
|
| 51 |
+
iface = gr.Interface(fn=doo, inputs="video", outputs="video")
|
| 52 |
iface.launch()
|