gilesitorr commited on
Commit
ebdd4c1
1 Parent(s): 1edc55c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -105,7 +105,7 @@ def remover(my_string = ""):
105
  return my_string
106
 
107
  def translate(oracion, model):
108
- sentence = make_translation(oracion.strip().lower(), dictionary, threshold=90, fraction=4/5) # oracion[:] #
109
  sentence_tokens = [tokens + ['<END>', '<PAD>'] for tokens in [sentence.split(' ')]]
110
  tr_input = [list(map(lambda x: source_token_dict[x] if x in source_token_dict.keys() else source_token_dict['<UNK>'], tokens)) for tokens in sentence_tokens][0]
111
  decoded = decode(
 
105
  return my_string
106
 
107
  def translate(oracion, model):
108
+ sentence = oracion[:] # make_translation(oracion.strip().lower(), dictionary, threshold=90, fraction=4/5) #
109
  sentence_tokens = [tokens + ['<END>', '<PAD>'] for tokens in [sentence.split(' ')]]
110
  tr_input = [list(map(lambda x: source_token_dict[x] if x in source_token_dict.keys() else source_token_dict['<UNK>'], tokens)) for tokens in sentence_tokens][0]
111
  decoded = decode(