Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ cap_labels = (
|
|
36 |
'visor cap'
|
37 |
)
|
38 |
|
39 |
-
model = load_learner('cap-recognizer-v0.pkl')
|
40 |
|
41 |
def recognize_image(image):
|
42 |
pred, idx, probs = model.predict(image)
|
@@ -50,5 +50,5 @@ examples = [
|
|
50 |
'unknown02.png'
|
51 |
]
|
52 |
|
53 |
-
iface = gr.Interface(recognize_image, gr.Image(
|
54 |
iface.launch(inline=False)
|
|
|
36 |
'visor cap'
|
37 |
)
|
38 |
|
39 |
+
model = load_learner('models/cap-recognizer-v0.pkl')
|
40 |
|
41 |
def recognize_image(image):
|
42 |
pred, idx, probs = model.predict(image)
|
|
|
50 |
'unknown02.png'
|
51 |
]
|
52 |
|
53 |
+
iface = gr.Interface(recognize_image, gr.Image(), gr.Label(), examples=examples)
|
54 |
iface.launch(inline=False)
|