Spaces:
Sleeping
Sleeping
Edward Tan
commited on
Commit
·
85ca075
1
Parent(s):
406dcf6
remove pathlib dependency
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.learner import load_learner
|
| 3 |
-
from fastcore.all import Path
|
| 4 |
|
| 5 |
categories = 'grizzly','black','teddy'
|
| 6 |
learn_inf = load_learner('model/trained_image_model.pkl')
|
|
@@ -11,7 +10,7 @@ def classify_image(img):
|
|
| 11 |
|
| 12 |
image = gr.Image()
|
| 13 |
label = gr.Label()
|
| 14 |
-
examples = [
|
| 15 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 16 |
intf.launch(inline=False, share=True)
|
| 17 |
# intf.launch(inline=False, share=True, auth=("admin", "pass1234"))
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.learner import load_learner
|
|
|
|
| 3 |
|
| 4 |
categories = 'grizzly','black','teddy'
|
| 5 |
learn_inf = load_learner('model/trained_image_model.pkl')
|
|
|
|
| 10 |
|
| 11 |
image = gr.Image()
|
| 12 |
label = gr.Label()
|
| 13 |
+
examples = ["images/grizzly.jpg"]
|
| 14 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 15 |
intf.launch(inline=False, share=True)
|
| 16 |
# intf.launch(inline=False, share=True, auth=("admin", "pass1234"))
|