Update app.py
Browse files
app.py
CHANGED
|
@@ -10,17 +10,18 @@ inf = load_learner('export.pkl')
|
|
| 10 |
|
| 11 |
def classify_img(img):
|
| 12 |
pred, idx, probs = inf.predict(img)
|
| 13 |
-
return
|
|
|
|
| 14 |
|
| 15 |
#|export
|
| 16 |
|
| 17 |
#This creates the gradio interface
|
| 18 |
|
| 19 |
image = gr.Image(shape=(192,192))
|
| 20 |
-
label = gr.outputs
|
| 21 |
|
| 22 |
#examples = ['cheetah.jpg','leopard.jpg','img.jpg']
|
| 23 |
|
| 24 |
-
intf = gr.Interface(fn = classify_img, inputs=image,outputs=
|
| 25 |
|
| 26 |
intf.launch()
|
|
|
|
| 10 |
|
| 11 |
def classify_img(img):
|
| 12 |
pred, idx, probs = inf.predict(img)
|
| 13 |
+
return pred
|
| 14 |
+
#return dict(zip(categories,map(float,probs)))
|
| 15 |
|
| 16 |
#|export
|
| 17 |
|
| 18 |
#This creates the gradio interface
|
| 19 |
|
| 20 |
image = gr.Image(shape=(192,192))
|
| 21 |
+
label = gr.outputs
|
| 22 |
|
| 23 |
#examples = ['cheetah.jpg','leopard.jpg','img.jpg']
|
| 24 |
|
| 25 |
+
intf = gr.Interface(fn = classify_img, inputs=image,outputs=pred)
|
| 26 |
|
| 27 |
intf.launch()
|