Spaces:
Sleeping
Sleeping
Valentin Tunev
commited on
Commit
·
bdc78b6
1
Parent(s):
317305e
WIP:
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ categories = ["Barlett", "Concorde"]
|
|
| 10 |
|
| 11 |
def classify_pear(pear):
|
| 12 |
pred, idx, probs = learn.predict(pear)
|
| 13 |
-
|
| 14 |
-
return
|
| 15 |
|
| 16 |
demo = gr.Interface(fn=classify_pear, inputs="image", outputs="text")
|
| 17 |
demo.launch()
|
|
|
|
| 10 |
|
| 11 |
def classify_pear(pear):
|
| 12 |
pred, idx, probs = learn.predict(pear)
|
| 13 |
+
result = f"This is a {pred} pear.\n\n{dict(zip(categories, map(float, probs)))}"
|
| 14 |
+
return result
|
| 15 |
|
| 16 |
demo = gr.Interface(fn=classify_pear, inputs="image", outputs="text")
|
| 17 |
demo.launch()
|