Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,15 +8,15 @@ df = dataset["train"].to_pandas()
|
|
| 8 |
unique_src = df[["item_id", "src_text"]].drop_duplicates(subset="item_id")
|
| 9 |
langs = list(df["lang_id"].unique())
|
| 10 |
|
| 11 |
-
st.title("DivEMT Explorer")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
cc1, _ = st.columns([2, 1])
|
| 14 |
-
with cc1:
|
| 15 |
-
st.write("""
|
| 16 |
-
The DivEMT Explorer is a tool to explore translations and edits contained in the DivEMT corpus.
|
| 17 |
-
Use the expandable section "Explore examples" below to visualize some of the original source sentences. When you found a sentence that you might be interested in, insert its numeric id (between 0 and 429) in the box below, and select all the languages for which you want to visualize the results.
|
| 18 |
-
Inside every generated section you will find the translations for all the available settings, alongside aligned edits and a collection of collected metadata. You can filter the showed settings to better see the aligned edits annotations.
|
| 19 |
-
""")
|
| 20 |
with st.expander("Explore examples"):
|
| 21 |
col1, col2, _ = st.columns([3,2,5])
|
| 22 |
with col1:
|
|
@@ -46,7 +46,8 @@ with col2_main:
|
|
| 46 |
'Select languages',
|
| 47 |
options=langs
|
| 48 |
)
|
| 49 |
-
st.markdown("
|
|
|
|
| 50 |
task_names = ["From Scratch (HT)", "Google PE (PE1)", "mBART PE (PE2)"]
|
| 51 |
for lang in langs:
|
| 52 |
with st.expander(f"View {lang.upper()} data"):
|
|
|
|
| 8 |
unique_src = df[["item_id", "src_text"]].drop_duplicates(subset="item_id")
|
| 9 |
langs = list(df["lang_id"].unique())
|
| 10 |
|
| 11 |
+
st.title("DivEMT Explorer π π")
|
| 12 |
+
st.markdown("""
|
| 13 |
+
##### The DivEMT Explorer is a tool to explore translations and edits in the DivEMT corpus.
|
| 14 |
+
|
| 15 |
+
##### Use the expandable section "Explore examples" below to visualize some of the original source sentences. When you find an interesting sentence, insert its numeric id (between 0 and 429) in the box below, and select all the available languages you want to use for visualizing the results.
|
| 16 |
+
|
| 17 |
+
##### Inside every generated language section, you will find the translations for all the available settings, alongside aligned edits and a collection of collected metadata. You can filter the shown settings to see the aligned edits annotations.
|
| 18 |
+
""")
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
with st.expander("Explore examples"):
|
| 21 |
col1, col2, _ = st.columns([3,2,5])
|
| 22 |
with col1:
|
|
|
|
| 46 |
'Select languages',
|
| 47 |
options=langs
|
| 48 |
)
|
| 49 |
+
st.markdown("##### Source text")
|
| 50 |
+
st.markdown("##### <span style='color: #ff4b4b'> " + unique_src.iloc[int(item_id)]["src_text"] + "</span>", unsafe_allow_html=True)
|
| 51 |
task_names = ["From Scratch (HT)", "Google PE (PE1)", "mBART PE (PE2)"]
|
| 52 |
for lang in langs:
|
| 53 |
with st.expander(f"View {lang.upper()} data"):
|