Update app.py
Browse files
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 |
|