Demosthene-OR commited on
Commit
fb025ec
1 Parent(s): 992fd9e
Files changed (2) hide show
  1. app.py +2 -1
  2. tabs/data_viz_tab.py +2 -2
app.py CHANGED
@@ -41,7 +41,8 @@ if ('/' in thisfile):
41
  print("Path after:",os.path.abspath(__file__))
42
 
43
  # Nécessaire pour la version windows 11
44
- os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'python'
 
45
 
46
  # Tabs in the ./tabs folder, imported here.
47
  from tabs import intro, exploration_tab, data_viz_tab, id_lang_tab, modelisation_dict_tab, modelisation_seq2seq_tab, game_tab
 
41
  print("Path after:",os.path.abspath(__file__))
42
 
43
  # Nécessaire pour la version windows 11
44
+ if st.session_state.Cloud == 0:
45
+ os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'python'
46
 
47
  # Tabs in the ./tabs folder, imported here.
48
  from tabs import intro, exploration_tab, data_viz_tab, id_lang_tab, modelisation_dict_tab, modelisation_seq2seq_tab, game_tab
tabs/data_viz_tab.py CHANGED
@@ -345,13 +345,13 @@ def run():
345
  # Initialiser la variable des mots vides
346
  stop_words = set(stopwords.words('english'))
347
  for e in txt_en : text += e
348
- plot_word_cloud(text, "English words corpus", "../images/coeur.png", stop_words)
349
  else:
350
  text = ""
351
  # Initialiser la variable des mots vides
352
  stop_words = set(stopwords.words('french'))
353
  for e in txt_fr : text += e
354
- plot_word_cloud(text,"Mots français du corpus", "../images/coeur.png", stop_words)
355
 
356
  with tab2:
357
  st.subheader(tr("Frequence d'apparition des mots"))
 
345
  # Initialiser la variable des mots vides
346
  stop_words = set(stopwords.words('english'))
347
  for e in txt_en : text += e
348
+ plot_word_cloud(text, "English words corpus", st.session_state.ImagePath+"/coeur.png", stop_words)
349
  else:
350
  text = ""
351
  # Initialiser la variable des mots vides
352
  stop_words = set(stopwords.words('french'))
353
  for e in txt_fr : text += e
354
+ plot_word_cloud(text,"Mots français du corpus", st.session_state.ImagePath+"/coeur.png", stop_words)
355
 
356
  with tab2:
357
  st.subheader(tr("Frequence d'apparition des mots"))