Spaces:
Runtime error
Runtime error
himanshu3103
commited on
Commit
·
891c125
1
Parent(s):
611581f
change in predict function
Browse files
app.py
CHANGED
|
@@ -6,7 +6,6 @@ learn = load_learner('characters.pkl')
|
|
| 6 |
|
| 7 |
labels = learn.dls.vocab
|
| 8 |
def predict(img):
|
| 9 |
-
img = PILImage.create(img)
|
| 10 |
pred,pred_idx,probs = learn.predict(img)
|
| 11 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 12 |
|
|
|
|
| 6 |
|
| 7 |
labels = learn.dls.vocab
|
| 8 |
def predict(img):
|
|
|
|
| 9 |
pred,pred_idx,probs = learn.predict(img)
|
| 10 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 11 |
|