ezamorag commited on
Commit
55a10c4
1 Parent(s): e0c3bdf

Update app.py

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