ongkn commited on
Commit
7946495
·
unverified ·
1 Parent(s): d79cde0

now rounding the scores for better readability

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -44,6 +44,7 @@ def classify_image(input):
44
  )
45
  result = gradCam.get_top_category(model, tensorResized)
46
  cls = result[0]["label"]
 
47
  clsIdx = gradCam.category_name_to_index(model, cls)
48
  clsTarget = ClassifierOutputTarget(clsIdx)
49
  gradCamImage = gradCam.run_grad_cam_on_image(model=model,
 
44
  )
45
  result = gradCam.get_top_category(model, tensorResized)
46
  cls = result[0]["label"]
47
+ result[0]["score"] = round(result[0]["score"], 3)
48
  clsIdx = gradCam.category_name_to_index(model, cls)
49
  clsTarget = ClassifierOutputTarget(clsIdx)
50
  gradCamImage = gradCam.run_grad_cam_on_image(model=model,