Spaces:
Sleeping
Sleeping
Commit
·
c605bde
1
Parent(s):
a1dcafd
vocab added
Browse files
app.py
CHANGED
@@ -9,29 +9,7 @@ import gradio as gr
|
|
9 |
|
10 |
model = load_learner('models/sport-recognizer-v3.pkl')
|
11 |
|
12 |
-
equipment_labels =
|
13 |
-
'Archery Bow',
|
14 |
-
'Badminton Shuttlecock',
|
15 |
-
'Baseball Bat',
|
16 |
-
'Basketball ball',
|
17 |
-
'Bowling Ball',
|
18 |
-
'Boxing Gloves',
|
19 |
-
'Carrom board',
|
20 |
-
'Chessboard',
|
21 |
-
'Cricket Bat',
|
22 |
-
'Frisbee disc',
|
23 |
-
'Golf ball',
|
24 |
-
'Hockey Stick',
|
25 |
-
'Ice Skates',
|
26 |
-
'Rugby Ball',
|
27 |
-
'Skateboard',
|
28 |
-
'Ski Poles',
|
29 |
-
'Soccer ball',
|
30 |
-
'Table Tennis Paddle',
|
31 |
-
'Tennis Racket',
|
32 |
-
'Volleyball ball'
|
33 |
-
|
34 |
-
)
|
35 |
|
36 |
def recognize_image(image):
|
37 |
pred, idx, probs = model.predict(image)
|
|
|
9 |
|
10 |
model = load_learner('models/sport-recognizer-v3.pkl')
|
11 |
|
12 |
+
equipment_labels = model.dls.vocab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
def recognize_image(image):
|
15 |
pred, idx, probs = model.predict(image)
|