Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,8 +73,8 @@ for lang in langs:
|
|
| 73 |
mt_text = dic["mt_text"]
|
| 74 |
if mt_text is None:
|
| 75 |
mt_text = "<span style='opacity:0'>" + "".join(["O " for i in range(max_mt_length // 2)]) + "</span>"
|
| 76 |
-
st.markdown(f"<b>MT</b>: {mt_text}", unsafe_allow_html=True)
|
| 77 |
-
st.markdown(f"<b>PE</b>: {dic['tgt_text']}", unsafe_allow_html=True)
|
| 78 |
st.markdown(f"<b>Aligned edits</b>:", unsafe_allow_html=True)
|
| 79 |
if dic["aligned_edit"] is not None:
|
| 80 |
st.text(dic["aligned_edit"].replace("\\n", "\n").replace("REF:", "MT :").replace("HYP:", "PE :"))
|
|
|
|
| 73 |
mt_text = dic["mt_text"]
|
| 74 |
if mt_text is None:
|
| 75 |
mt_text = "<span style='opacity:0'>" + "".join(["O " for i in range(max_mt_length // 2)]) + "</span>"
|
| 76 |
+
st.markdown(f"<b>MT</b>: {'<bdi>' if lang == 'ara' else ''}{mt_text}{'</bdi>' if lang == 'ara' else ''}", unsafe_allow_html=True)
|
| 77 |
+
st.markdown(f"<b>PE</b>: {'<bdi>' if lang == 'ara' else ''}{dic['tgt_text']}{'</bdi>' if lang == 'ara' else ''}", unsafe_allow_html=True)
|
| 78 |
st.markdown(f"<b>Aligned edits</b>:", unsafe_allow_html=True)
|
| 79 |
if dic["aligned_edit"] is not None:
|
| 80 |
st.text(dic["aligned_edit"].replace("\\n", "\n").replace("REF:", "MT :").replace("HYP:", "PE :"))
|