Spaces:
Sleeping
Sleeping
KathrynMercer
commited on
formatting
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ labels = learn.dls.vocab
|
|
12 |
def predict(img):
|
13 |
img = PILImage.create(img)
|
14 |
pred,pred_idx,probs = learn.predict(img)
|
15 |
-
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
16 |
|
17 |
gr.Interface(fn=predict,
|
18 |
inputs='image',
|
|
|
12 |
def predict(img):
|
13 |
img = PILImage.create(img)
|
14 |
pred,pred_idx,probs = learn.predict(img)
|
15 |
+
return {labels[i].title(): float(probs[i]) for i in range(len(labels))}
|
16 |
|
17 |
gr.Interface(fn=predict,
|
18 |
inputs='image',
|