ezamorag commited on
Commit
e0c3bdf
·
1 Parent(s): e914abf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -59,8 +59,7 @@ def displaytext_detclasim(c_cnames, c_scinames, coverage):
59
  for (_,c) in countings_list:
60
  total += c
61
 
62
-
63
- text = f'free space = {100-int(coverage.split('.')[0])}'+'\n\n'
64
  text += 'Countings by scientific name:\n'
65
  for key,value in countings_list:
66
  text += f'{key} = {value}'+'\n'
@@ -82,7 +81,7 @@ def displaytext_yolocounter(countings, coverage):
82
  for (y_class,c) in countings_list:
83
  total += c
84
 
85
- text = f'free space = {100-int(coverage.split('.')[0])}'+'\n\n'
86
  for key,value in countings_list:
87
  text += f'{key} = {value}'+'\n'
88
  text += '\n'
 
59
  for (_,c) in countings_list:
60
  total += c
61
 
62
+ text = f'free space = {100-round(float(coverage.replace('%','')),0)}'+'\n\n'
 
63
  text += 'Countings by scientific name:\n'
64
  for key,value in countings_list:
65
  text += f'{key} = {value}'+'\n'
 
81
  for (y_class,c) in countings_list:
82
  total += c
83
 
84
+ text = f'free space = {100-round(float(coverage.replace('%','')),0)}'+'\n\n'
85
  for key,value in countings_list:
86
  text += f'{key} = {value}'+'\n'
87
  text += '\n'