Formatting output
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ categories = ('Beaver Dam', 'Not a Beaver Dam')
|
|
6 |
|
7 |
def is_it_a_beaver_dam(input_img):
|
8 |
pred, idx, probs = learner.predict(input_img)
|
9 |
-
return {dict(zip(categories, map(float, probs)))}
|
10 |
|
11 |
demo = gr.Interface(fn=is_it_a_beaver_dam, inputs=gr.Image(shape=(200, 200)), outputs=gr.Label())
|
12 |
|
|
|
6 |
|
7 |
def is_it_a_beaver_dam(input_img):
|
8 |
pred, idx, probs = learner.predict(input_img)
|
9 |
+
return f'{pred} {dict(zip(categories, map(float, probs)))}'
|
10 |
|
11 |
demo = gr.Interface(fn=is_it_a_beaver_dam, inputs=gr.Image(shape=(200, 200)), outputs=gr.Label())
|
12 |
|