Commit
•
bc744b9
1
Parent(s):
55eb5cd
Update modelisation_seq2seq_tab.py
Browse files
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 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
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)
|