Demosthene-OR
commited on
Commit
•
172ea8a
1
Parent(s):
2bc4127
Update main_dl.py
Browse files- main_dl.py +2 -0
main_dl.py
CHANGED
@@ -272,6 +272,7 @@ def check_api():
|
|
272 |
@api.get('/small_vocab/rnn', name="Traduction par RNN")
|
273 |
def check_api(lang_tgt:str,
|
274 |
texte: str):
|
|
|
275 |
|
276 |
if (lang_tgt=='en'):
|
277 |
translation_model = rnn_en_fr
|
@@ -283,6 +284,7 @@ def check_api(lang_tgt:str,
|
|
283 |
@api.get('/small_vocab/transformer', name="Traduction par Transformer")
|
284 |
def check_api(lang_tgt:str,
|
285 |
texte: str):
|
|
|
286 |
|
287 |
if (lang_tgt=='en'):
|
288 |
translation_model = rnn_en_fr
|
|
|
272 |
@api.get('/small_vocab/rnn', name="Traduction par RNN")
|
273 |
def check_api(lang_tgt:str,
|
274 |
texte: str):
|
275 |
+
global translation_model
|
276 |
|
277 |
if (lang_tgt=='en'):
|
278 |
translation_model = rnn_en_fr
|
|
|
284 |
@api.get('/small_vocab/transformer', name="Traduction par Transformer")
|
285 |
def check_api(lang_tgt:str,
|
286 |
texte: str):
|
287 |
+
global translation_model
|
288 |
|
289 |
if (lang_tgt=='en'):
|
290 |
translation_model = rnn_en_fr
|