Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,6 @@ labels = learn.dls.vocab
|
|
8 |
|
9 |
def predict(img):
|
10 |
img = PILImage.create(img)
|
11 |
-
size = (224, 224)
|
12 |
-
img = img.thumbnail(size, Image.ANTIALIAS)
|
13 |
_pred, _pred_w_idx, probs = learn.predict(img)
|
14 |
# gradio doesn't support tensors, so converting to float
|
15 |
labels_probs = {labels[i]: float(probs[i]) for i, _ in enumerate(labels)}
|
|
|
8 |
|
9 |
def predict(img):
|
10 |
img = PILImage.create(img)
|
|
|
|
|
11 |
_pred, _pred_w_idx, probs = learn.predict(img)
|
12 |
# gradio doesn't support tensors, so converting to float
|
13 |
labels_probs = {labels[i]: float(probs[i]) for i, _ in enumerate(labels)}
|