Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ fruit_labels = ('Apple', 'Apricot', 'Avocado',
|
|
11 |
'Pear', 'Pineapple',
|
12 |
'Raspberry', 'Strawberry', 'Watermelon')
|
13 |
|
14 |
-
model=load_learner("
|
15 |
|
16 |
def recognize_image(image):
|
17 |
pred, idx, probs = model.predict(image)
|
@@ -22,10 +22,10 @@ def recognize_image(image):
|
|
22 |
image = gr.inputs.Image(shape=(192,192))
|
23 |
label = gr.outputs.Label(num_top_classes=5)
|
24 |
examples = [
|
25 |
-
'
|
26 |
-
'
|
27 |
-
'
|
28 |
-
'
|
29 |
]
|
30 |
|
31 |
iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
|
|
|
11 |
'Pear', 'Pineapple',
|
12 |
'Raspberry', 'Strawberry', 'Watermelon')
|
13 |
|
14 |
+
model=load_learner("fruit_model_v6.pkl")
|
15 |
|
16 |
def recognize_image(image):
|
17 |
pred, idx, probs = model.predict(image)
|
|
|
22 |
image = gr.inputs.Image(shape=(192,192))
|
23 |
label = gr.outputs.Label(num_top_classes=5)
|
24 |
examples = [
|
25 |
+
'test_0.jpg',
|
26 |
+
'test_1.jpg',
|
27 |
+
'test_2.jpg',
|
28 |
+
'test_4.jpeg'
|
29 |
]
|
30 |
|
31 |
iface = gr.Interface(fn=recognize_image, inputs=image, outputs=label, examples=examples)
|