Demosthene-OR commited on
Commit
d5bb204
1 Parent(s): 172ea8a

Update main_dl.py

Browse files
Files changed (1) hide show
  1. main_dl.py +4 -4
main_dl.py CHANGED
@@ -275,10 +275,10 @@ def check_api(lang_tgt:str,
275
  global translation_model
276
 
277
  if (lang_tgt=='en'):
278
- translation_model = rnn_en_fr
279
  return decode_sequence_rnn(texte, "en", "fr")
280
  else:
281
- translation_model = rnn_fr_en
282
  return decode_sequence_rnn(texte, "fr", "en")
283
 
284
  @api.get('/small_vocab/transformer', name="Traduction par Transformer")
@@ -287,10 +287,10 @@ def check_api(lang_tgt:str,
287
  global translation_model
288
 
289
  if (lang_tgt=='en'):
290
- translation_model = rnn_en_fr
291
  return decode_sequence_tranf(texte, "en", "fr")
292
  else:
293
- translation_model = rnn_fr_en
294
  return decode_sequence_tranf(texte, "fr", "en")
295
 
296
  '''
 
275
  global translation_model
276
 
277
  if (lang_tgt=='en'):
278
+ translation_model = rnn_fr_en
279
  return decode_sequence_rnn(texte, "en", "fr")
280
  else:
281
+ translation_model = rnn_en_fr
282
  return decode_sequence_rnn(texte, "fr", "en")
283
 
284
  @api.get('/small_vocab/transformer', name="Traduction par Transformer")
 
287
  global translation_model
288
 
289
  if (lang_tgt=='en'):
290
+ translation_model = rnn_fr_en
291
  return decode_sequence_tranf(texte, "en", "fr")
292
  else:
293
+ translation_model = rnn_en_fr
294
  return decode_sequence_tranf(texte, "fr", "en")
295
 
296
  '''