Demosthene-OR commited on
Commit
bc744b9
1 Parent(s): 55eb5cd

Update modelisation_seq2seq_tab.py

Browse files
Files changed (1) hide show
  1. tabs/modelisation_seq2seq_tab.py +6 -7
tabs/modelisation_seq2seq_tab.py CHANGED
@@ -114,17 +114,16 @@ def display_translation(n1, Lang,model_type):
114
  for i in range(3):
115
  # Ajout du parametre à la liste des parametres
116
  params.append(url+"?lang_tgt="+target+"&texte="+s[i])
117
- print(params[i])
118
 
119
  with Pool(3) as p:
120
  responses = p.map(fetch_translation, params)
121
 
122
- for i in range(3):
123
- s_trad.append(responses[i].json())
124
- st.write("**"+source+" :** :blue["+ s[i]+"]")
125
- st.write("**"+target+" :** "+s_trad[-1])
126
- st.write("**ref. :** "+s_trad_ref[i])
127
- st.write("")
128
  with placeholder:
129
  st.write("<p style='text-align:center;background-color:red; color:white')>Score Bleu = "+str(int(round(corpus_bleu(s_trad,[s_trad_ref]).score,0)))+"%</p>", \
130
  unsafe_allow_html=True)
 
114
  for i in range(3):
115
  # Ajout du parametre à la liste des parametres
116
  params.append(url+"?lang_tgt="+target+"&texte="+s[i])
 
117
 
118
  with Pool(3) as p:
119
  responses = p.map(fetch_translation, params)
120
 
121
+ for i in range(3):
122
+ s_trad.append(responses[i].json())
123
+ st.write("**"+source+" :** :blue["+ s[i]+"]")
124
+ st.write("**"+target+" :** "+s_trad[-1])
125
+ st.write("**ref. :** "+s_trad_ref[i])
126
+ st.write("")
127
  with placeholder:
128
  st.write("<p style='text-align:center;background-color:red; color:white')>Score Bleu = "+str(int(round(corpus_bleu(s_trad,[s_trad_ref]).score,0)))+"%</p>", \
129
  unsafe_allow_html=True)