Spaces:
Runtime error
Runtime error
David Sosa commited on
Commit ·
e35e70b
1
Parent(s): 4322d81
corrected import
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
__all__ = ['learn', 'bear_categories', 'image', 'label', 'examples', 'intf', 'classify_image']
|
| 5 |
|
| 6 |
# %% ../bear_detector.ipynb 1
|
| 7 |
-
from
|
| 8 |
import gradio as gr
|
| 9 |
|
| 10 |
# %% ../bear_detector.ipynb 3
|
|
@@ -20,10 +20,10 @@ def classify_image(img):
|
|
| 20 |
# %% ../bear_detector.ipynb 7
|
| 21 |
image = gr.inputs.Image(shape=(192,192))
|
| 22 |
label = gr.outputs.Label()
|
| 23 |
-
examples = ["gradio_examples/black1.jpg",
|
| 24 |
"gradio_examples/black2.jpg",
|
| 25 |
"gradio_examples/black3.jpg",
|
| 26 |
-
"gradio_examples/teddy1.jpg"
|
| 27 |
]
|
| 28 |
|
| 29 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
|
|
|
| 4 |
__all__ = ['learn', 'bear_categories', 'image', 'label', 'examples', 'intf', 'classify_image']
|
| 5 |
|
| 6 |
# %% ../bear_detector.ipynb 1
|
| 7 |
+
from fastai.vision.all import *
|
| 8 |
import gradio as gr
|
| 9 |
|
| 10 |
# %% ../bear_detector.ipynb 3
|
|
|
|
| 20 |
# %% ../bear_detector.ipynb 7
|
| 21 |
image = gr.inputs.Image(shape=(192,192))
|
| 22 |
label = gr.outputs.Label()
|
| 23 |
+
examples = ["gradio_examples/black1.jpg",
|
| 24 |
"gradio_examples/black2.jpg",
|
| 25 |
"gradio_examples/black3.jpg",
|
| 26 |
+
"gradio_examples/teddy1.jpg"
|
| 27 |
]
|
| 28 |
|
| 29 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|