Spaces:
Runtime error
Runtime error
Commit
·
0154065
1
Parent(s):
223c057
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ path = Path()
|
|
4 |
path.ls(file_exts='.pkl')
|
5 |
learn_inf = load_learner(path/'export.pkl')
|
6 |
labels = learn_inf.dls.vocab
|
7 |
-
def on_click_classify(
|
8 |
img = PILImage.create(image)
|
9 |
pred,pred_idx,probs = learn_inf.predict(img)
|
10 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
|
|
4 |
path.ls(file_exts='.pkl')
|
5 |
learn_inf = load_learner(path/'export.pkl')
|
6 |
labels = learn_inf.dls.vocab
|
7 |
+
def on_click_classify(image):
|
8 |
img = PILImage.create(image)
|
9 |
pred,pred_idx,probs = learn_inf.predict(img)
|
10 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|