Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,9 +16,9 @@ LABELS = LEARN.dls.vocab
|
|
| 16 |
|
| 17 |
def gradio_predict(img):
|
| 18 |
img = img.resize((512, 512))
|
| 19 |
-
img = PILImage.create(img)
|
| 20 |
_pred, _pred_idx, probs = LEARN.predict(img)
|
| 21 |
-
labels_probs = dict(zip(
|
| 22 |
return labels_probs
|
| 23 |
|
| 24 |
# with open('gradio_article.md') as f:
|
|
|
|
| 16 |
|
| 17 |
def gradio_predict(img):
|
| 18 |
img = img.resize((512, 512))
|
| 19 |
+
# img = PILImage.create(img)
|
| 20 |
_pred, _pred_idx, probs = LEARN.predict(img)
|
| 21 |
+
labels_probs = dict(zip(LABELS, map(float,probs)))
|
| 22 |
return labels_probs
|
| 23 |
|
| 24 |
# with open('gradio_article.md') as f:
|