Spaces:
Runtime error
Runtime error
Ubuntu
commited on
Commit
·
5feff63
1
Parent(s):
2379ea0
init
Browse files- .ipynb_checkpoints/app-checkpoint.py +2 -2
- app.py +2 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -101,7 +101,7 @@ def video_identity(video,user_name,class_name,trainortest,ready):
|
|
101 |
|
102 |
else:
|
103 |
capture = cv2.VideoCapture(video)
|
104 |
-
|
105 |
user_d=str(user_name)+'/'+str(trainortest)
|
106 |
class_d=str(user_name)+'/'+str(trainortest)+'/'+str(class_name)
|
107 |
if not os.path.exists(user_d):
|
@@ -123,7 +123,7 @@ def video_identity(video,user_name,class_name,trainortest,ready):
|
|
123 |
|
124 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
125 |
|
126 |
-
return img, trainortest,
|
127 |
demo = gr.Interface(video_identity,
|
128 |
inputs=[gr.Video(source='upload'),
|
129 |
gr.Text(),
|
|
|
101 |
|
102 |
else:
|
103 |
capture = cv2.VideoCapture(video)
|
104 |
+
!sysctl kernel.shmmax
|
105 |
user_d=str(user_name)+'/'+str(trainortest)
|
106 |
class_d=str(user_name)+'/'+str(trainortest)+'/'+str(class_name)
|
107 |
if not os.path.exists(user_d):
|
|
|
123 |
|
124 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
125 |
|
126 |
+
return img, trainortest, class_d
|
127 |
demo = gr.Interface(video_identity,
|
128 |
inputs=[gr.Video(source='upload'),
|
129 |
gr.Text(),
|
app.py
CHANGED
@@ -101,7 +101,7 @@ def video_identity(video,user_name,class_name,trainortest,ready):
|
|
101 |
|
102 |
else:
|
103 |
capture = cv2.VideoCapture(video)
|
104 |
-
|
105 |
user_d=str(user_name)+'/'+str(trainortest)
|
106 |
class_d=str(user_name)+'/'+str(trainortest)+'/'+str(class_name)
|
107 |
if not os.path.exists(user_d):
|
@@ -123,7 +123,7 @@ def video_identity(video,user_name,class_name,trainortest,ready):
|
|
123 |
|
124 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
125 |
|
126 |
-
return img, trainortest,
|
127 |
demo = gr.Interface(video_identity,
|
128 |
inputs=[gr.Video(source='upload'),
|
129 |
gr.Text(),
|
|
|
101 |
|
102 |
else:
|
103 |
capture = cv2.VideoCapture(video)
|
104 |
+
!sysctl kernel.shmmax
|
105 |
user_d=str(user_name)+'/'+str(trainortest)
|
106 |
class_d=str(user_name)+'/'+str(trainortest)+'/'+str(class_name)
|
107 |
if not os.path.exists(user_d):
|
|
|
123 |
|
124 |
img=cv2.imread(class_d+'/frame_0.jpg')
|
125 |
|
126 |
+
return img, trainortest, class_d
|
127 |
demo = gr.Interface(video_identity,
|
128 |
inputs=[gr.Video(source='upload'),
|
129 |
gr.Text(),
|