pedrogengo commited on
Commit
3efcaca
·
verified ·
1 Parent(s): b47a39c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -235,6 +235,7 @@ def get_results(tokenizer_name, base_lang, comp_lang):
235
  agg_base = np.array(base_results).mean()
236
  agg_comp = np.array(comp_results).mean()
237
  token_ratio = (agg_comp / agg_base)
 
238
 
239
  if token_ratio < 1.:
240
  adverb = "less"
@@ -244,7 +245,7 @@ def get_results(tokenizer_name, base_lang, comp_lang):
244
  adverb = "more"
245
  token_ratio = (token_ratio - 1.) * 100
246
 
247
- output = f"You need {token_ratio}% tokens to represent your text in {comp_lang} than in {base_lang}."
248
  return output
249
 
250
 
 
235
  agg_base = np.array(base_results).mean()
236
  agg_comp = np.array(comp_results).mean()
237
  token_ratio = (agg_comp / agg_base)
238
+ print(token_ratio)
239
 
240
  if token_ratio < 1.:
241
  adverb = "less"
 
245
  adverb = "more"
246
  token_ratio = (token_ratio - 1.) * 100
247
 
248
+ output = f"You need {token_ratio}% {adverb} tokens to represent your text in {comp_lang} than in {base_lang}."
249
  return output
250
 
251