Spaces:
Runtime error
Runtime error
sukesh_karza
commited on
Commit
·
57af560
1
Parent(s):
c598af7
Updated requirements to fix the runtime error
Browse files- app.py +1 -2
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -16,8 +16,7 @@ fastai.layers.LabelSmoothingCrossEntropyFlat = fastai.losses.LabelSmoothingCross
|
|
| 16 |
|
| 17 |
model = load_learner("model.pkl")
|
| 18 |
def predict(im):
|
| 19 |
-
|
| 20 |
-
image_file = PILImage.create((255-im))
|
| 21 |
pred,pred_idx,probs = model.predict(image_file)
|
| 22 |
vals, indx = torch.topk(probs,2)
|
| 23 |
|
|
|
|
| 16 |
|
| 17 |
model = load_learner("model.pkl")
|
| 18 |
def predict(im):
|
| 19 |
+
image_file = PILImage(PILImage.create((255-im)))
|
|
|
|
| 20 |
pred,pred_idx,probs = model.predict(image_file)
|
| 21 |
vals, indx = torch.topk(probs,2)
|
| 22 |
|
requirements.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
fastai==2.2.7
|
|
|
|
|
|
| 1 |
fastai==2.2.7
|
| 2 |
+
Pillow==8.2.0
|