joaomaia commited on
Commit
e954efa
·
verified ·
1 Parent(s): d6cd4e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -52,13 +52,16 @@ def determinar_faixa(probabilidade):
52
  '50-55%', '55-60%', '60-65%', '65-70%', '70-75%',
53
  '75-80%', '80-85%', '85-90%', '90-95%', '95-100%'
54
  ]
55
- bin_width = 5
56
  for b in bins:
57
- lower, upper = map(int, b.split('-'))
58
  if lower <= probabilidade < upper:
59
  return b
 
 
60
  return '95-100%'
61
 
 
62
  def fazer_previsao(ODD_H, ODD_D, ODD_A, min_percent, max_percent):
63
  ODD_H = converter_para_float(ODD_H)
64
  ODD_D = converter_para_float(ODD_D)
 
52
  '50-55%', '55-60%', '60-65%', '65-70%', '70-75%',
53
  '75-80%', '80-85%', '85-90%', '90-95%', '95-100%'
54
  ]
55
+
56
  for b in bins:
57
+ lower, upper = map(lambda x: int(x.replace('%', '')), b.split('-'))
58
  if lower <= probabilidade < upper:
59
  return b
60
+
61
+ # Handling edge case where probability is exactly 100%
62
  return '95-100%'
63
 
64
+
65
  def fazer_previsao(ODD_H, ODD_D, ODD_A, min_percent, max_percent):
66
  ODD_H = converter_para_float(ODD_H)
67
  ODD_D = converter_para_float(ODD_D)