Spaces:
Build error
Build error
Ubuntu
commited on
Commit
·
d328d4c
1
Parent(s):
4abe765
- .ipynb_checkpoints/app-checkpoint.py +4 -2
- .ipynb_checkpoints/requirements-checkpoint.txt +3 -1
- app.py +4 -2
- requirements.txt +2 -1
.ipynb_checkpoints/app-checkpoint.py
CHANGED
|
@@ -2,10 +2,12 @@ import gradio as gr
|
|
| 2 |
import os
|
| 3 |
import cv2
|
| 4 |
from encoded_video import EncodedVideo, write_video
|
| 5 |
-
|
| 6 |
|
| 7 |
def video_identity(filepath):
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
while (True):
|
| 10 |
|
| 11 |
success, frame = capture.read()
|
|
|
|
| 2 |
import os
|
| 3 |
import cv2
|
| 4 |
from encoded_video import EncodedVideo, write_video
|
| 5 |
+
import torch
|
| 6 |
|
| 7 |
def video_identity(filepath):
|
| 8 |
+
vid = EncodedVideo.from_path(filepath)
|
| 9 |
+
write_video('out.mp4', vid)
|
| 10 |
+
capture = cv2.VideoCapture('out.mp4')
|
| 11 |
while (True):
|
| 12 |
|
| 13 |
success, frame = capture.read()
|
.ipynb_checkpoints/requirements-checkpoint.txt
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
opencv-python
|
|
|
|
|
|
|
|
|
| 1 |
+
opencv-python
|
| 2 |
+
encoded-video
|
| 3 |
+
torch
|
app.py
CHANGED
|
@@ -2,10 +2,12 @@ import gradio as gr
|
|
| 2 |
import os
|
| 3 |
import cv2
|
| 4 |
from encoded_video import EncodedVideo, write_video
|
| 5 |
-
|
| 6 |
|
| 7 |
def video_identity(filepath):
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
while (True):
|
| 10 |
|
| 11 |
success, frame = capture.read()
|
|
|
|
| 2 |
import os
|
| 3 |
import cv2
|
| 4 |
from encoded_video import EncodedVideo, write_video
|
| 5 |
+
import torch
|
| 6 |
|
| 7 |
def video_identity(filepath):
|
| 8 |
+
vid = EncodedVideo.from_path(filepath)
|
| 9 |
+
write_video('out.mp4', vid)
|
| 10 |
+
capture = cv2.VideoCapture('out.mp4')
|
| 11 |
while (True):
|
| 12 |
|
| 13 |
success, frame = capture.read()
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
opencv-python
|
| 2 |
-
encoded-video
|
|
|
|
|
|
| 1 |
opencv-python
|
| 2 |
+
encoded-video
|
| 3 |
+
torch
|