Colbe commited on
Commit
730bc94
1 Parent(s): 7278900

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,11 +5,11 @@ def which_player(x): return x[0].isupper()
5
 
6
  learn = load_learner('model.pkl')
7
 
8
- categories = ('Kevin Durant', 'Kyrie Irving', 'Ben Simmons', 'Kawhi Leonard', 'Zach Lavine')
9
 
10
  def classify_image(img):
11
  pred, ids, probs = learn.predict(img)
12
- return dict(zip(pred, map(float, probs)))
13
 
14
  image = gr.inputs.Image(shape=(192, 192))
15
  label = gr.outputs.Label()
 
5
 
6
  learn = load_learner('model.pkl')
7
 
8
+ categories = learn.dls.vocab
9
 
10
  def classify_image(img):
11
  pred, ids, probs = learn.predict(img)
12
+ return dict(zip(categories, map(float, probs)))
13
 
14
  image = gr.inputs.Image(shape=(192, 192))
15
  label = gr.outputs.Label()