Spaces:
Build error
Build error
Ubuntu
commited on
Commit
·
92c0827
1
Parent(s):
2cd5985
- .ipynb_checkpoints/app-checkpoint.py +4 -2
- app.py +4 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
|
@@ -7,10 +7,12 @@ import numpy as np
|
|
| 7 |
|
| 8 |
def video_identity(video,user_name,class_name):
|
| 9 |
|
| 10 |
-
|
| 11 |
capture = cv2.VideoCapture(video)
|
| 12 |
user_d=str(user_name)
|
| 13 |
class_d=str(user_name)+'/'+str(class_name)
|
|
|
|
|
|
|
| 14 |
if not os.path.exists(user_d):
|
| 15 |
os.makedirs(user_d)
|
| 16 |
if not os.path.exists(class_d):
|
|
@@ -30,7 +32,7 @@ def video_identity(video,user_name,class_name):
|
|
| 30 |
|
| 31 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
| 32 |
|
| 33 |
-
return img,
|
| 34 |
demo = gr.Interface(video_identity,
|
| 35 |
inputs=[gr.Video(source='upload'),
|
| 36 |
gr.Text(),
|
|
|
|
| 7 |
|
| 8 |
def video_identity(video,user_name,class_name):
|
| 9 |
|
| 10 |
+
here='nothing'
|
| 11 |
capture = cv2.VideoCapture(video)
|
| 12 |
user_d=str(user_name)
|
| 13 |
class_d=str(user_name)+'/'+str(class_name)
|
| 14 |
+
if os.path.exists(class_d):
|
| 15 |
+
here='something'
|
| 16 |
if not os.path.exists(user_d):
|
| 17 |
os.makedirs(user_d)
|
| 18 |
if not os.path.exists(class_d):
|
|
|
|
| 32 |
|
| 33 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
| 34 |
|
| 35 |
+
return img, here
|
| 36 |
demo = gr.Interface(video_identity,
|
| 37 |
inputs=[gr.Video(source='upload'),
|
| 38 |
gr.Text(),
|
app.py
CHANGED
|
@@ -7,10 +7,12 @@ import numpy as np
|
|
| 7 |
|
| 8 |
def video_identity(video,user_name,class_name):
|
| 9 |
|
| 10 |
-
|
| 11 |
capture = cv2.VideoCapture(video)
|
| 12 |
user_d=str(user_name)
|
| 13 |
class_d=str(user_name)+'/'+str(class_name)
|
|
|
|
|
|
|
| 14 |
if not os.path.exists(user_d):
|
| 15 |
os.makedirs(user_d)
|
| 16 |
if not os.path.exists(class_d):
|
|
@@ -30,7 +32,7 @@ def video_identity(video,user_name,class_name):
|
|
| 30 |
|
| 31 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
| 32 |
|
| 33 |
-
return img,
|
| 34 |
demo = gr.Interface(video_identity,
|
| 35 |
inputs=[gr.Video(source='upload'),
|
| 36 |
gr.Text(),
|
|
|
|
| 7 |
|
| 8 |
def video_identity(video,user_name,class_name):
|
| 9 |
|
| 10 |
+
here='nothing'
|
| 11 |
capture = cv2.VideoCapture(video)
|
| 12 |
user_d=str(user_name)
|
| 13 |
class_d=str(user_name)+'/'+str(class_name)
|
| 14 |
+
if os.path.exists(class_d):
|
| 15 |
+
here='something'
|
| 16 |
if not os.path.exists(user_d):
|
| 17 |
os.makedirs(user_d)
|
| 18 |
if not os.path.exists(class_d):
|
|
|
|
| 32 |
|
| 33 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
| 34 |
|
| 35 |
+
return img, here
|
| 36 |
demo = gr.Interface(video_identity,
|
| 37 |
inputs=[gr.Video(source='upload'),
|
| 38 |
gr.Text(),
|