Demosthene-OR
commited on
Commit
•
e48f480
1
Parent(s):
ba0fbcd
Update modelisation_seq2seq_tab.py
Browse files
tabs/modelisation_seq2seq_tab.py
CHANGED
@@ -124,9 +124,18 @@ def display_translation(n1, Lang, model_type):
|
|
124 |
st.write(f"**{target} :** {s_trad[-1]}")
|
125 |
st.write(f"**ref. :** {s_ref}")
|
126 |
st.write("")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
with placeholder:
|
128 |
-
st.write("<p style='text-align:center;background-color:red; color:white')>Score Bleu = "+str(int(round(
|
129 |
unsafe_allow_html=True)
|
|
|
|
|
130 |
'''
|
131 |
async def fetch_translation(url, params):
|
132 |
async with aiohttp.ClientSession() as session:
|
|
|
124 |
st.write(f"**{target} :** {s_trad[-1]}")
|
125 |
st.write(f"**ref. :** {s_ref}")
|
126 |
st.write("")
|
127 |
+
|
128 |
+
# Calcul du score BLEU après avoir récupéré toutes les traductions
|
129 |
+
if s_trad:
|
130 |
+
score_bleu = corpus_bleu(s_trad, [s_trad_ref]).score
|
131 |
+
else:
|
132 |
+
score_bleu = 0
|
133 |
+
|
134 |
with placeholder:
|
135 |
+
st.write("<p style='text-align:center;background-color:red; color:white')>Score Bleu = "+str(int(round(score_bleu,0)))+"%</p>", \
|
136 |
unsafe_allow_html=True)
|
137 |
+
|
138 |
+
|
139 |
'''
|
140 |
async def fetch_translation(url, params):
|
141 |
async with aiohttp.ClientSession() as session:
|