CalvHobbes commited on
Commit
c460421
·
1 Parent(s): fe07070

updated message

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -15,7 +15,8 @@ learn = load_learner("topmountainsmodel.pkl")
15
  def predict(img):
16
  img = PILImage.create(img)
17
  mt_type,_,probs = learn.predict(img)
18
- return mt_type
 
19
 
20
  iface = gr.Interface(fn=predict, inputs="image", outputs="label")
21
  iface.launch()
 
15
  def predict(img):
16
  img = PILImage.create(img)
17
  mt_type,_,probs = learn.predict(img)
18
+ message = f"I am {probs[0]:.4f} percent certain that this mountain is: {mt_type}")
19
+ return message
20
 
21
  iface = gr.Interface(fn=predict, inputs="image", outputs="label")
22
  iface.launch()