Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
learn_inf = load_learner(path/'export.pkl')
|
6 |
def classify_image(img):
|
7 |
pred,pred_idx,probs = learn_inf.predict(img)
|
8 |
return f'Prediction: {pred}; Probability: float({probs[pred_idx]:.04f})'
|
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
3 |
|
4 |
+
learn_inf = load_learner('export.pkl')
|
|
|
5 |
def classify_image(img):
|
6 |
pred,pred_idx,probs = learn_inf.predict(img)
|
7 |
return f'Prediction: {pred}; Probability: float({probs[pred_idx]:.04f})'
|