Demosthene-OR commited on
Commit
34e7c43
1 Parent(s): 5cb11b9
tabs/data_viz_tab.py CHANGED
@@ -247,7 +247,7 @@ def proximite():
247
  tokens = []
248
 
249
  nb_words = st.slider(tr('Nombre de mots à afficher')+' :',10,50, value=20)
250
- df = pd.read_csv('../data/dict_we_en_fr',header=0,index_col=0, encoding ="utf-8", keep_default_na=False)
251
  words_en = df.index.to_list()[:nb_words]
252
  words_fr = df['Francais'].to_list()[:nb_words]
253
 
 
247
  tokens = []
248
 
249
  nb_words = st.slider(tr('Nombre de mots à afficher')+' :',10,50, value=20)
250
+ df = pd.read_csv(dataPath+'/data/dict_we_en_fr',header=0,index_col=0, encoding ="utf-8", keep_default_na=False)
251
  words_en = df.index.to_list()[:nb_words]
252
  words_fr = df['Francais'].to_list()[:nb_words]
253
 
tabs/game_tab.py CHANGED
@@ -133,7 +133,7 @@ def run():
133
  stat = top_stats[k]
134
  print("%s memory blocks: %.1f KiB" % (stat.count, stat.size / 1024))
135
  for line in stat.traceback.format():
136
- print(line)
137
  total_mem = sum(stat.size for stat in top_stats)
138
  print("Total allocated size: %.1f KiB" % (total_mem / 1024))
139
  return
 
133
  stat = top_stats[k]
134
  print("%s memory blocks: %.1f KiB" % (stat.count, stat.size / 1024))
135
  for line in stat.traceback.format():
136
+ print(' >'+line)
137
  total_mem = sum(stat.size for stat in top_stats)
138
  print("Total allocated size: %.1f KiB" % (total_mem / 1024))
139
  return
tabs/id_lang_tab.py CHANGED
@@ -98,7 +98,7 @@ def init_dl_identifier():
98
  list_lan = read_list_lan()
99
  lan_identified = [lan_to_language[l] for l in list_lan]
100
  label_encoder.fit(list_lan)
101
- merge = Merge(dataPath+"/dl_id_lang_split", "../data", "dl_tiktoken_id_language_model.h5").merge(cleanup=False)
102
  dl_model = keras.models.load_model(dataPath+"/dl_tiktoken_id_language_model.h5")
103
  return dl_model, label_encoder, list_lan, lan_identified
104
 
 
98
  list_lan = read_list_lan()
99
  lan_identified = [lan_to_language[l] for l in list_lan]
100
  label_encoder.fit(list_lan)
101
+ merge = Merge(dataPath+"/dl_id_lang_split", dataPath, "dl_tiktoken_id_language_model.h5").merge(cleanup=False)
102
  dl_model = keras.models.load_model(dataPath+"/dl_tiktoken_id_language_model.h5")
103
  return dl_model, label_encoder, list_lan, lan_identified
104
 
tabs/modelisation_seq2seq_tab.py CHANGED
@@ -413,8 +413,8 @@ def run():
413
  """)
414
  , unsafe_allow_html=True)
415
  st.write("<center><h5>"+tr("Architecture du modèle utilisé")+":</h5>", unsafe_allow_html=True)
416
- plot_model(translation_model, show_shapes=True, show_layer_names=True, show_layer_activations=True,rankdir='TB',to_file='../images/model_plot.png')
417
- st.image('../images/model_plot.png',use_column_width=True)
418
  st.write("</center>", unsafe_allow_html=True)
419
 
420
 
 
413
  """)
414
  , unsafe_allow_html=True)
415
  st.write("<center><h5>"+tr("Architecture du modèle utilisé")+":</h5>", unsafe_allow_html=True)
416
+ plot_model(translation_model, show_shapes=True, show_layer_names=True, show_layer_activations=True,rankdir='TB',to_file=st.session_state.ImagePath+'/model_plot.png')
417
+ st.image(st.session_state.ImagePath+'/model_plot.png',use_column_width=True)
418
  st.write("</center>", unsafe_allow_html=True)
419
 
420