Spaces:
Runtime error
Runtime error
Stephen Lee commited on
Commit ·
599e240
1
Parent(s): e9a2b8a
fix categories undefined
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: 02_production_gradio.ipynb.
|
| 2 |
|
| 3 |
# %% auto 0
|
| 4 |
-
__all__ = ['path', 'learn', 'image', 'label', 'examples', 'intf', 'classify_image']
|
| 5 |
|
| 6 |
# %% 02_production_gradio.ipynb 0
|
| 7 |
from fastai.vision.all import *
|
|
@@ -10,6 +10,10 @@ import gradio as gr
|
|
| 10 |
path = Path('bears')
|
| 11 |
learn = load_learner('export.pkl')
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# %% 02_production_gradio.ipynb 2
|
| 14 |
image = gr.inputs.Image(shape=(192, 192))
|
| 15 |
label = gr.outputs.Label()
|
|
|
|
| 1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: 02_production_gradio.ipynb.
|
| 2 |
|
| 3 |
# %% auto 0
|
| 4 |
+
__all__ = ['path', 'learn', 'categories', 'image', 'label', 'examples', 'intf', 'classify_image']
|
| 5 |
|
| 6 |
# %% 02_production_gradio.ipynb 0
|
| 7 |
from fastai.vision.all import *
|
|
|
|
| 10 |
path = Path('bears')
|
| 11 |
learn = load_learner('export.pkl')
|
| 12 |
|
| 13 |
+
# %% 02_production_gradio.ipynb 1
|
| 14 |
+
categories = learn.dls.vocab
|
| 15 |
+
|
| 16 |
+
|
| 17 |
# %% 02_production_gradio.ipynb 2
|
| 18 |
image = gr.inputs.Image(shape=(192, 192))
|
| 19 |
label = gr.outputs.Label()
|