Demosthene-OR commited on
Commit
95cfa3f
1 Parent(s): 8d04e29

Update id_lang_tab.py

Browse files
Files changed (1) hide show
  1. tabs/id_lang_tab.py +3 -2
tabs/id_lang_tab.py CHANGED
@@ -13,6 +13,7 @@ import matplotlib.pyplot as plt
13
  import seaborn as sns
14
  from sklearn import naive_bayes
15
  from translate_app import tr
 
16
 
17
  title = "Identification de langue"
18
  sidebar_name = "Identification de langue"
@@ -279,12 +280,12 @@ def display_shapley(lang_sel):
279
 
280
  def run():
281
  global tokenizer, vectorizer, dict_token, dict_ids, nb_token, lan_to_language, clf_nb
282
- global dl_model, label_encoder, toggle_val, custom_sentence, list_lan, lan_identified
283
  global lang_exemples, exemples
284
 
285
 
286
  tokenizer, dict_token, dict_ids, nb_token, lan_to_language, clf_nb, vectorizer = init_nb_identifier()
287
- dl_model, label_encoder, list_lan, lan_identified = init_dl_identifier()
288
  lang_id_model_ext, dict_xlmr, sentence_test, lang_exemples, exemples= init_lang_id_external()
289
 
290
  st.write("")
 
13
  import seaborn as sns
14
  from sklearn import naive_bayes
15
  from translate_app import tr
16
+ import requests
17
 
18
  title = "Identification de langue"
19
  sidebar_name = "Identification de langue"
 
280
 
281
  def run():
282
  global tokenizer, vectorizer, dict_token, dict_ids, nb_token, lan_to_language, clf_nb
283
+ global toggle_val, custom_sentence, lan_identified
284
  global lang_exemples, exemples
285
 
286
 
287
  tokenizer, dict_token, dict_ids, nb_token, lan_to_language, clf_nb, vectorizer = init_nb_identifier()
288
+ lan_identified = requests.get( "https://demosthene-or-api-avr23-cds-translation.hf.space/lan_identified").json()
289
  lang_id_model_ext, dict_xlmr, sentence_test, lang_exemples, exemples= init_lang_id_external()
290
 
291
  st.write("")