Spaces:
Running
Running
Updating layout
Browse files
app.py
CHANGED
@@ -22,14 +22,14 @@ dt_tokenizer = DanteTokenizer()
|
|
22 |
default_model = "News"
|
23 |
model_choices = {
|
24 |
"News": "Emanuel/porttagger-news-base",
|
25 |
-
"Tweets": "Emanuel/porttagger-tweets-base",
|
26 |
-
"Oil and Gas": "Emanuel/porttagger-oilgas-base",
|
27 |
"Multigenre": "Emanuel/porttagger-base",
|
28 |
}
|
29 |
pre_tokenizers = {
|
30 |
"News": nlp,
|
31 |
-
"Tweets": dt_tokenizer.tokenize,
|
32 |
-
"Oil and Gas": nlp,
|
33 |
"Multigenre": nlp,
|
34 |
}
|
35 |
logger = logging.getLogger()
|
@@ -177,7 +177,8 @@ with gr.Blocks(css=css) as demo:
|
|
177 |
with gr.Tab("Multiple sentences"):
|
178 |
gr.HTML(
|
179 |
"""
|
180 |
-
<p>
|
|
|
181 |
Find below an example of what we expect the content of the file to look like.
|
182 |
Sentences are automatically split by spaCy's sentencizer.
|
183 |
To force an explicit segmentation, manually separate the sentences using a new line for each one.</p>
|
|
|
22 |
default_model = "News"
|
23 |
model_choices = {
|
24 |
"News": "Emanuel/porttagger-news-base",
|
25 |
+
"Tweets (stock market)": "Emanuel/porttagger-tweets-base",
|
26 |
+
"Oil and Gas (academic texts)": "Emanuel/porttagger-oilgas-base",
|
27 |
"Multigenre": "Emanuel/porttagger-base",
|
28 |
}
|
29 |
pre_tokenizers = {
|
30 |
"News": nlp,
|
31 |
+
"Tweets (stock market)": dt_tokenizer.tokenize,
|
32 |
+
"Oil and Gas (academic texts)": nlp,
|
33 |
"Multigenre": nlp,
|
34 |
}
|
35 |
logger = logging.getLogger()
|
|
|
177 |
with gr.Tab("Multiple sentences"):
|
178 |
gr.HTML(
|
179 |
"""
|
180 |
+
<p align="justify"">
|
181 |
+
 Upload a plain text file with sentences in it.
|
182 |
Find below an example of what we expect the content of the file to look like.
|
183 |
Sentences are automatically split by spaCy's sentencizer.
|
184 |
To force an explicit segmentation, manually separate the sentences using a new line for each one.</p>
|
top.html
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
href="https://universaldependencies.org/">Universal Dependencies</a> model
|
8 |
</p>
|
9 |
</div>
|
10 |
-
<p style="margin-top: 30px; margin-bottom: 10px; font-size: 94%; text-align:
|
11 |
-
Porttagger is a state of the art part of speech tagger for Brazilian Portuguese that automatically assigns
|
12 |
morphosyntactic classes to the words of sentences, following the Universal Dependencies international model. You
|
13 |
may provide single sentences or multiple sentences (using plain text files with several sentences) to be tagged.
|
14 |
You may also choose which trained model to use. The options include a model trained on news texts (using the
|
|
|
7 |
href="https://universaldependencies.org/">Universal Dependencies</a> model
|
8 |
</p>
|
9 |
</div>
|
10 |
+
<p style="margin-top: 30px; margin-bottom: 10px; font-size: 94%; text-align: justify;">
|
11 |
+
 Porttagger is a state of the art part of speech tagger for Brazilian Portuguese that automatically assigns
|
12 |
morphosyntactic classes to the words of sentences, following the Universal Dependencies international model. You
|
13 |
may provide single sentences or multiple sentences (using plain text files with several sentences) to be tagged.
|
14 |
You may also choose which trained model to use. The options include a model trained on news texts (using the
|