Ubuntu commited on
Commit
2d36d9d
1 Parent(s): c88bfe2
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +2 -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, class_d
127
  demo = gr.Interface(video_identity,
128
  inputs=[gr.Video(source='upload'),
129
  gr.Text(),
 
101
 
102
  else:
103
  capture = cv2.VideoCapture(video)
104
+ shm=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, shm
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, class_d
127
  demo = gr.Interface(video_identity,
128
  inputs=[gr.Video(source='upload'),
129
  gr.Text(),
 
101
 
102
  else:
103
  capture = cv2.VideoCapture(video)
104
+ shm=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, shm
127
  demo = gr.Interface(video_identity,
128
  inputs=[gr.Video(source='upload'),
129
  gr.Text(),