Spaces:
Build error
Build error
Rubanza Silver
commited on
Commit
·
9e30515
1
Parent(s):
15f6601
adding title, desc and interpreter
Browse files
app.py
CHANGED
|
@@ -37,11 +37,16 @@ def classify_image(img):
|
|
| 37 |
pred,idx,probs = learn.predict(img)
|
| 38 |
return dict(zip(categories, map(float,probs)))
|
| 39 |
|
|
|
|
| 40 |
# %% antelopeInference.ipynb 31
|
| 41 |
#create gradio interface
|
| 42 |
image = gr.inputs.Image(shape=(128,128))
|
| 43 |
label = gr.outputs.Label()
|
| 44 |
examples = ['antelopeA.jpeg', 'antelopeB.jpeg', 'antelopeC.jpeg']
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
intf.launch(inline=False)
|
|
|
|
| 37 |
pred,idx,probs = learn.predict(img)
|
| 38 |
return dict(zip(categories, map(float,probs)))
|
| 39 |
|
| 40 |
+
|
| 41 |
# %% antelopeInference.ipynb 31
|
| 42 |
#create gradio interface
|
| 43 |
image = gr.inputs.Image(shape=(128,128))
|
| 44 |
label = gr.outputs.Label()
|
| 45 |
examples = ['antelopeA.jpeg', 'antelopeB.jpeg', 'antelopeC.jpeg']
|
| 46 |
|
| 47 |
+
title = "East African Antelope classifier"
|
| 48 |
+
description = "A deep learning based image classifier that tells you what breed of antelope is in a picture"
|
| 49 |
+
interpretation = "default"
|
| 50 |
+
|
| 51 |
+
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples, title=title, description=description, interpretation=interpretation)
|
| 52 |
intf.launch(inline=False)
|