Spaces:
Runtime error
Runtime error
CalvHobbes
commited on
Commit
•
12b2e88
1
Parent(s):
4494002
new message
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ learn = load_learner("topmountainsmodel.pkl")
|
|
15 |
def predict(img):
|
16 |
img = PILImage.create(img)
|
17 |
mt_type,_,probs = learn.predict(img)
|
18 |
-
message = (f"
|
19 |
return message
|
20 |
|
21 |
iface = gr.Interface(fn=predict, inputs="image", outputs="label")
|
|
|
15 |
def predict(img):
|
16 |
img = PILImage.create(img)
|
17 |
mt_type,_,probs = learn.predict(img)
|
18 |
+
message = (f"Probability that this mountain is: {mt_type} is {probs[0]:.4f}")
|
19 |
return message
|
20 |
|
21 |
iface = gr.Interface(fn=predict, inputs="image", outputs="label")
|