try to fix syntax issue
Browse files
app.py
CHANGED
@@ -8,9 +8,9 @@ from fastai.vision.widgets import *
|
|
8 |
f = Path() / 'bamboo_or_butterfly.pkl'
|
9 |
learn_inf = load_learner(f)
|
10 |
|
11 |
-
def predict(img)
|
12 |
pred, pred_idx, probs = learn_inf.predict(img.to_thumb(224))
|
13 |
-
f'Prediction: {pred}; Probability:{probs[pred_idx]:.04f}'
|
14 |
|
15 |
iface = gr.Interface(fn=predict, inputs="image", outputs="text")
|
16 |
iface.launch()
|
|
|
8 |
f = Path() / 'bamboo_or_butterfly.pkl'
|
9 |
learn_inf = load_learner(f)
|
10 |
|
11 |
+
def predict(img):
|
12 |
pred, pred_idx, probs = learn_inf.predict(img.to_thumb(224))
|
13 |
+
return f'Prediction: {pred}; Probability:{probs[pred_idx]:.04f}'
|
14 |
|
15 |
iface = gr.Interface(fn=predict, inputs="image", outputs="text")
|
16 |
iface.launch()
|