Spaces:
Build error
Build error
Ubuntu commited on
Commit ·
2491068
1
Parent(s): ed609ce
- .ipynb_checkpoints/app-checkpoint.py +5 -4
- app.py +5 -4
.ipynb_checkpoints/app-checkpoint.py
CHANGED
|
@@ -5,10 +5,10 @@ from encoded_video import EncodedVideo, write_video
|
|
| 5 |
import torch
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
-
def video_identity(video):
|
| 9 |
|
| 10 |
|
| 11 |
-
capture = cv2.VideoCapture(video
|
| 12 |
|
| 13 |
frameNr = 0
|
| 14 |
while (True):
|
|
@@ -25,10 +25,11 @@ def video_identity(video):
|
|
| 25 |
|
| 26 |
img=cv2.imread('frame_0.jpg')
|
| 27 |
|
| 28 |
-
return img
|
| 29 |
demo = gr.Interface(video_identity,
|
| 30 |
inputs=[gr.Video(source='upload'),
|
| 31 |
gr.Text()],
|
| 32 |
-
outputs=gr.Image(),
|
|
|
|
| 33 |
cache_examples=True)
|
| 34 |
demo.launch(debug=True)
|
|
|
|
| 5 |
import torch
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
+
def video_identity(video,text):
|
| 9 |
|
| 10 |
|
| 11 |
+
capture = cv2.VideoCapture(video)
|
| 12 |
|
| 13 |
frameNr = 0
|
| 14 |
while (True):
|
|
|
|
| 25 |
|
| 26 |
img=cv2.imread('frame_0.jpg')
|
| 27 |
|
| 28 |
+
return img, text
|
| 29 |
demo = gr.Interface(video_identity,
|
| 30 |
inputs=[gr.Video(source='upload'),
|
| 31 |
gr.Text()],
|
| 32 |
+
outputs=[gr.Image(),
|
| 33 |
+
gr.Text()],
|
| 34 |
cache_examples=True)
|
| 35 |
demo.launch(debug=True)
|
app.py
CHANGED
|
@@ -5,10 +5,10 @@ from encoded_video import EncodedVideo, write_video
|
|
| 5 |
import torch
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
-
def video_identity(video):
|
| 9 |
|
| 10 |
|
| 11 |
-
capture = cv2.VideoCapture(video
|
| 12 |
|
| 13 |
frameNr = 0
|
| 14 |
while (True):
|
|
@@ -25,10 +25,11 @@ def video_identity(video):
|
|
| 25 |
|
| 26 |
img=cv2.imread('frame_0.jpg')
|
| 27 |
|
| 28 |
-
return img
|
| 29 |
demo = gr.Interface(video_identity,
|
| 30 |
inputs=[gr.Video(source='upload'),
|
| 31 |
gr.Text()],
|
| 32 |
-
outputs=gr.Image(),
|
|
|
|
| 33 |
cache_examples=True)
|
| 34 |
demo.launch(debug=True)
|
|
|
|
| 5 |
import torch
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
+
def video_identity(video,text):
|
| 9 |
|
| 10 |
|
| 11 |
+
capture = cv2.VideoCapture(video)
|
| 12 |
|
| 13 |
frameNr = 0
|
| 14 |
while (True):
|
|
|
|
| 25 |
|
| 26 |
img=cv2.imread('frame_0.jpg')
|
| 27 |
|
| 28 |
+
return img, text
|
| 29 |
demo = gr.Interface(video_identity,
|
| 30 |
inputs=[gr.Video(source='upload'),
|
| 31 |
gr.Text()],
|
| 32 |
+
outputs=[gr.Image(),
|
| 33 |
+
gr.Text()],
|
| 34 |
cache_examples=True)
|
| 35 |
demo.launch(debug=True)
|