Spaces:
Build error
Build error
Ubuntu commited on
Commit ·
7eaf50e
1
Parent(s): 068c371
- .ipynb_checkpoints/app-checkpoint.py +2 -18
- app.py +2 -18
.ipynb_checkpoints/app-checkpoint.py
CHANGED
|
@@ -6,26 +6,10 @@ import cv2
|
|
| 6 |
|
| 7 |
def video_identity(video):
|
| 8 |
|
| 9 |
-
capture=cv2.VideoCapture(video.name)
|
| 10 |
-
frameNr = 0
|
| 11 |
-
|
| 12 |
-
while (True):
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
if success:
|
| 17 |
-
cv2.imwrite(f'train/frame_{frameNr}.jpg', frame)
|
| 18 |
-
|
| 19 |
-
else:
|
| 20 |
-
break
|
| 21 |
-
|
| 22 |
-
frameNr = frameNr+10
|
| 23 |
-
|
| 24 |
-
capture.release()
|
| 25 |
-
|
| 26 |
-
return str(frameNr)
|
| 27 |
demo = gr.Interface(video_identity,
|
| 28 |
gr.Video(),
|
| 29 |
-
|
| 30 |
cache_examples=True)
|
| 31 |
demo.launch(debug=True)
|
|
|
|
| 6 |
|
| 7 |
def video_identity(video):
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
return video
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
demo = gr.Interface(video_identity,
|
| 12 |
gr.Video(),
|
| 13 |
+
gr.Video(),
|
| 14 |
cache_examples=True)
|
| 15 |
demo.launch(debug=True)
|
app.py
CHANGED
|
@@ -6,26 +6,10 @@ import cv2
|
|
| 6 |
|
| 7 |
def video_identity(video):
|
| 8 |
|
| 9 |
-
capture=cv2.VideoCapture(video.name)
|
| 10 |
-
frameNr = 0
|
| 11 |
-
|
| 12 |
-
while (True):
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
if success:
|
| 17 |
-
cv2.imwrite(f'train/frame_{frameNr}.jpg', frame)
|
| 18 |
-
|
| 19 |
-
else:
|
| 20 |
-
break
|
| 21 |
-
|
| 22 |
-
frameNr = frameNr+10
|
| 23 |
-
|
| 24 |
-
capture.release()
|
| 25 |
-
|
| 26 |
-
return str(frameNr)
|
| 27 |
demo = gr.Interface(video_identity,
|
| 28 |
gr.Video(),
|
| 29 |
-
|
| 30 |
cache_examples=True)
|
| 31 |
demo.launch(debug=True)
|
|
|
|
| 6 |
|
| 7 |
def video_identity(video):
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
return video
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
demo = gr.Interface(video_identity,
|
| 12 |
gr.Video(),
|
| 13 |
+
gr.Video(),
|
| 14 |
cache_examples=True)
|
| 15 |
demo.launch(debug=True)
|