minemaster01 commited on
Commit
f85c14a
·
verified ·
1 Parent(s): 7d670e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -107,10 +107,11 @@ def get_word_probabilities(text):
107
  current_word += token
108
  current_probs.append(prob)
109
  if current_word and current_probs:
110
- word_probs.append(float(sum(current_probs) / len(current_probs)))
111
  except Exception as e:
112
  print("Error during word aggregation:", e)
113
  return []
 
114
 
115
  return word_probs
116
 
 
107
  current_word += token
108
  current_probs.append(prob)
109
  if current_word and current_probs:
110
+ word_probs.append(sum(current_probs) / len(current_probs))
111
  except Exception as e:
112
  print("Error during word aggregation:", e)
113
  return []
114
+ word_probs = [float(p) for p in word_probs]
115
 
116
  return word_probs
117