Demosthene-OR
commited on
Commit
•
3a31df1
1
Parent(s):
e9491b8
Update main_dl.py
Browse files- main_dl.py +1 -4
main_dl.py
CHANGED
@@ -274,9 +274,6 @@ def init_dl_identifier():
|
|
274 |
label_encoder.fit(list_lan)
|
275 |
merge = Merge(dataPath+"/dl_id_lang_split", dataPath, "dl_tiktoken_id_language_model.h5").merge(cleanup=False)
|
276 |
dl_model = keras.models.load_model(dataPath+"/dl_tiktoken_id_language_model.h5") #, compile=False)
|
277 |
-
|
278 |
-
if (dl_model is not None): print("dl_model OK")
|
279 |
-
else: print("dl_model vide")
|
280 |
return
|
281 |
'''
|
282 |
init_dl_identifier()
|
@@ -363,7 +360,7 @@ async def language_id_dl(sentence:List[str] = Query(..., min_length=1)):
|
|
363 |
return lang_id_dl(sentence)
|
364 |
|
365 |
@api.get('/lan_identified', name="Langues identifiées par les modèles")
|
366 |
-
|
367 |
global lan_identified
|
368 |
|
369 |
if 'lan_identified' not in globals():
|
|
|
274 |
label_encoder.fit(list_lan)
|
275 |
merge = Merge(dataPath+"/dl_id_lang_split", dataPath, "dl_tiktoken_id_language_model.h5").merge(cleanup=False)
|
276 |
dl_model = keras.models.load_model(dataPath+"/dl_tiktoken_id_language_model.h5") #, compile=False)
|
|
|
|
|
|
|
277 |
return
|
278 |
'''
|
279 |
init_dl_identifier()
|
|
|
360 |
return lang_id_dl(sentence)
|
361 |
|
362 |
@api.get('/lan_identified', name="Langues identifiées par les modèles")
|
363 |
+
def languages_identified():
|
364 |
global lan_identified
|
365 |
|
366 |
if 'lan_identified' not in globals():
|