sl207 commited on
Commit
c25e9fc
·
verified ·
1 Parent(s): 8a5a22a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -4,6 +4,7 @@ from fastai.learner import load_learner
4
  learn = load_learner('model.pkl')
5
  labels = ['Adidas Shoe', 'New Balance Shoe', 'Nike Show']
6
  def predict(image):
 
7
  brand, idx, probs = learn.predict(image)
8
  return dict(zip(labels, map(float,probs)))
9
 
 
4
  learn = load_learner('model.pkl')
5
  labels = ['Adidas Shoe', 'New Balance Shoe', 'Nike Show']
6
  def predict(image):
7
+ image = PILImage.create(image)
8
  brand, idx, probs = learn.predict(image)
9
  return dict(zip(labels, map(float,probs)))
10