Spaces:
Running
Running
Bram Vanroy
commited on
Commit
β’
e10ccfa
1
Parent(s):
05de9a6
update typos
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ from utils import get_resources, LANGUAGES, translate
|
|
10 |
import streamlit as st
|
11 |
|
12 |
st.set_page_config(
|
13 |
-
page_title="
|
14 |
page_icon="π©βπ»"
|
15 |
)
|
16 |
|
17 |
-
st.title("π©βπ» Multilingual text
|
18 |
|
19 |
if "text" not in st.session_state:
|
20 |
st.session_state["text"] = ""
|
@@ -107,7 +107,7 @@ st.markdown("""
|
|
107 |
st.markdown("""[Abstract meaning representation](https://aclanthology.org/W13-2322/) (AMR)
|
108 |
is a semantic framework to describe meaning relations of sentences as graphs. In the SignON project, AMR is used as
|
109 |
an interlingua to translate between modalities and languages. To this end, I built MBART models for the task of
|
110 |
-
generating
|
111 |
""")
|
112 |
|
113 |
|
|
|
10 |
import streamlit as st
|
11 |
|
12 |
st.set_page_config(
|
13 |
+
page_title="Multilingual text-to-AMR demo by Bram Vanroy",
|
14 |
page_icon="π©βπ»"
|
15 |
)
|
16 |
|
17 |
+
st.title("π©βπ» Multilingual text-to-AMR")
|
18 |
|
19 |
if "text" not in st.session_state:
|
20 |
st.session_state["text"] = ""
|
|
|
107 |
st.markdown("""[Abstract meaning representation](https://aclanthology.org/W13-2322/) (AMR)
|
108 |
is a semantic framework to describe meaning relations of sentences as graphs. In the SignON project, AMR is used as
|
109 |
an interlingua to translate between modalities and languages. To this end, I built MBART models for the task of
|
110 |
+
generating AMR representations from an input sentence, which is show-cased in this demo.
|
111 |
""")
|
112 |
|
113 |
|
utils.py
CHANGED
@@ -3,12 +3,12 @@ from typing import Tuple, Union, Dict, List
|
|
3 |
from multi_amr.data.postprocessing_graph import ParsedStatus
|
4 |
from multi_amr.data.tokenization import AMRTokenizerWrapper
|
5 |
from optimum.bettertransformer import BetterTransformer
|
|
|
6 |
import streamlit as st
|
7 |
import torch
|
8 |
from torch.quantization import quantize_dynamic
|
9 |
from torch import nn, qint8
|
10 |
from transformers import MBartForConditionalGeneration, AutoConfig
|
11 |
-
import penman
|
12 |
|
13 |
|
14 |
@st.cache_resource(show_spinner=False)
|
|
|
3 |
from multi_amr.data.postprocessing_graph import ParsedStatus
|
4 |
from multi_amr.data.tokenization import AMRTokenizerWrapper
|
5 |
from optimum.bettertransformer import BetterTransformer
|
6 |
+
import penman
|
7 |
import streamlit as st
|
8 |
import torch
|
9 |
from torch.quantization import quantize_dynamic
|
10 |
from torch import nn, qint8
|
11 |
from transformers import MBartForConditionalGeneration, AutoConfig
|
|
|
12 |
|
13 |
|
14 |
@st.cache_resource(show_spinner=False)
|