Laurits commited on
Commit
e36e13a
·
1 Parent(s): 85a8984

This time it will work

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,8 +6,8 @@ learn = load_learner('model.pth')
6
  def classify_image(img):
7
  celebrity_name,_,probs = learn.predict(img)
8
  results = dict(zip(list(learn.dls.vocab),probs))
9
- best_results = sorted(A, key=A.get, reverse=True)[:5]
10
- probabilities = {key: A[key] for key in best_results}
11
  return {probabilities}
12
 
13
  image = gr.inputs.Image(shape=(224,224))
 
6
  def classify_image(img):
7
  celebrity_name,_,probs = learn.predict(img)
8
  results = dict(zip(list(learn.dls.vocab),probs))
9
+ best_results = sorted(results, key=results.get, reverse=True)[:5]
10
+ probabilities = {key: results[key] for key in best_results}
11
  return {probabilities}
12
 
13
  image = gr.inputs.Image(shape=(224,224))