Spaces:
Runtime error
Runtime error
Update app.py (#1)
Browse files- Update app.py (0a02b1ea2b248085113cda42dfd5c266b488267a)
app.py
CHANGED
@@ -8,14 +8,17 @@ from fastai.vision.all import *
|
|
8 |
import gradio as gr
|
9 |
|
10 |
# %% app.ipynb 4
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
learn = load_learner('export.pkl')
|
12 |
# print(type(learn))
|
13 |
|
14 |
|
15 |
# %% app.ipynb 8
|
16 |
-
def classify_image(img):
|
17 |
-
pred,pred_idx,probs = learn.predict(img)
|
18 |
-
return dict(zip(learn.dls.vocab, map(float, probs)))
|
19 |
|
20 |
# %% app.ipynb 10
|
21 |
image = gr.components.Image(shape=(192,192))
|
|
|
8 |
import gradio as gr
|
9 |
|
10 |
# %% app.ipynb 4
|
11 |
+
def classify_image(img):
|
12 |
+
pred,pred_idx,probs = learn.predict(img)
|
13 |
+
return dict(zip(learn.dls.vocab, map(float, probs)))
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
learn = load_learner('export.pkl')
|
18 |
# print(type(learn))
|
19 |
|
20 |
|
21 |
# %% app.ipynb 8
|
|
|
|
|
|
|
22 |
|
23 |
# %% app.ipynb 10
|
24 |
image = gr.components.Image(shape=(192,192))
|