Spaces:
Sleeping
Sleeping
Dstd90
commited on
Commit
·
a2629fe
1
Parent(s):
bc122dd
app.py change
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import load_learner
|
3 |
|
4 |
-
import pathlib
|
5 |
-
temp = pathlib.PosixPath
|
6 |
-
pathlib.PosixPath = pathlib.WindowsPath
|
7 |
|
8 |
shoe_labels = (
|
9 |
'Army boots',
|
@@ -54,15 +54,15 @@ def recognize_image(image):
|
|
54 |
image = gr.inputs.Image(shape=(192,192))
|
55 |
label = gr.outputs.Label(num_top_classes=5)
|
56 |
examples = [
|
57 |
-
'
|
58 |
-
'
|
59 |
-
'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
'
|
63 |
-
'
|
64 |
-
'
|
65 |
]
|
66 |
|
67 |
iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
|
68 |
-
iface.launch(inline=False
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import load_learner
|
3 |
|
4 |
+
# import pathlib
|
5 |
+
# temp = pathlib.PosixPath
|
6 |
+
# pathlib.PosixPath = pathlib.WindowsPath
|
7 |
|
8 |
shoe_labels = (
|
9 |
'Army boots',
|
|
|
54 |
image = gr.inputs.Image(shape=(192,192))
|
55 |
label = gr.outputs.Label(num_top_classes=5)
|
56 |
examples = [
|
57 |
+
'image-01.jpg',
|
58 |
+
'image-02.jpg',
|
59 |
+
'image-03.jpg',
|
60 |
+
'image-06.jpg',
|
61 |
+
'image-07.jpg',
|
62 |
+
'image-08.jpg',
|
63 |
+
'image-09.jpg',
|
64 |
+
'image-10.jpg'
|
65 |
]
|
66 |
|
67 |
iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
|
68 |
+
iface.launch(inline=False)
|