Spaces:
Runtime error
Runtime error
Commit ·
fef0820
1
Parent(s): 33425d5
let's deploy to huggingface spaces6
Browse files27 unmodified lines2829303132333427 unmodified linesdef predict(image):img = Image.open(image)pred, pred_idx, probs = learner.predict(img)return {labels[i]: float(probs[i]) for i in range(len(labels))}27 unmodified lines2829303132333427 unmodified linesdef predict(image):img = Image.fromarray(image)pred, pred_idx, probs = learner.predict(img)return {labels[i]: float(probs[i]) for i in range(len(labels))}
app.py+1-1