Spaces:
Paused
Paused
let's deploy to huggingface spaces
Browse files
app.py
CHANGED
|
@@ -4,7 +4,8 @@ import skimage
|
|
| 4 |
|
| 5 |
learn = load_learner('export.pkl')
|
| 6 |
labels = learn.dls.vocab
|
| 7 |
-
|
|
|
|
| 8 |
img = img.resize((512, 512))
|
| 9 |
img = PILImage.create(img)
|
| 10 |
pred,pred_idx,probs = learn.predict(img)
|
|
|
|
| 4 |
|
| 5 |
learn = load_learner('export.pkl')
|
| 6 |
labels = learn.dls.vocab
|
| 7 |
+
|
| 8 |
+
def predict(img):
|
| 9 |
img = img.resize((512, 512))
|
| 10 |
img = PILImage.create(img)
|
| 11 |
pred,pred_idx,probs = learn.predict(img)
|