update
Browse files
app.py
CHANGED
|
@@ -14,6 +14,7 @@ learn = load_learner("model.pkl")
|
|
| 14 |
categories = ("Dog", "Cat")
|
| 15 |
|
| 16 |
def classify_image(img):
|
|
|
|
| 17 |
_, _, probs = learn.predict(img)
|
| 18 |
return dict(zip(categories, [float(p) for p in probs]))
|
| 19 |
|
|
|
|
| 14 |
categories = ("Dog", "Cat")
|
| 15 |
|
| 16 |
def classify_image(img):
|
| 17 |
+
img = PILImage.create(img)
|
| 18 |
_, _, probs = learn.predict(img)
|
| 19 |
return dict(zip(categories, [float(p) for p in probs]))
|
| 20 |
|