shin-mashita commited on
Commit
17d99b0
1 Parent(s): 7a783a2
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -17,6 +17,9 @@ def preprocess(vidpath):
17
 
18
  for _ in range(num):
19
  _, img = cap.read()
 
 
 
20
 
21
  w, h, c = img.shape
22
  if w < 226 or h < 226:
@@ -78,7 +81,14 @@ def classify(video,dataset='WLASL100'):
78
 
79
  title = "I3D Sign Language Recognition"
80
  description = "Description here"
81
- examples = [['videos/no.mp4','WLASL100'],['videos/all.mp4','WLASL100'],['videos/blue.mp4','WLASL2000'],['videos/white.mp4','WLASL2000'],['videos/accident.mp4','WLASL2000']]
 
 
 
 
 
 
 
82
 
83
 
84
  gr.Interface( fn=classify,
 
17
 
18
  for _ in range(num):
19
  _, img = cap.read()
20
+
21
+ if img is None:
22
+ continue
23
 
24
  w, h, c = img.shape
25
  if w < 226 or h < 226:
 
81
 
82
  title = "I3D Sign Language Recognition"
83
  description = "Description here"
84
+ examples = [
85
+ ['videos/no.mp4','WLASL100'],
86
+ ['videos/all.mp4','WLASL100'],
87
+ ['videos/before.mp4','WLASL100'],
88
+ ['videos/blue.mp4','WLASL2000'],
89
+ ['videos/white.mp4','WLASL2000'],
90
+ ['videos/accident2.mp4','WLASL2000']
91
+ ]
92
 
93
 
94
  gr.Interface( fn=classify,