Update app.py
Browse files
app.py
CHANGED
|
@@ -17,6 +17,7 @@ learn = load_learner('resnet50_10epochs.pkl')
|
|
| 17 |
categories = ['city','town','countryside','ocean']
|
| 18 |
|
| 19 |
def classify_image(img):
|
|
|
|
| 20 |
pred, idx, probs = learn.predict(img)
|
| 21 |
ret = dict(
|
| 22 |
zip(categories,
|
|
|
|
| 17 |
categories = ['city','town','countryside','ocean']
|
| 18 |
|
| 19 |
def classify_image(img):
|
| 20 |
+
img = img.resize((128,128))
|
| 21 |
pred, idx, probs = learn.predict(img)
|
| 22 |
ret = dict(
|
| 23 |
zip(categories,
|