Spaces:
Running
Running
poltextlab
commited on
make text as big as on babel index-page
Browse files
app.py
CHANGED
@@ -7,22 +7,16 @@ from interfaces.emotion import demo as emotion_demo
|
|
7 |
from interfaces.ner import demo as ner_demo
|
8 |
from interfaces.ner import download_models as download_spacy_models
|
9 |
|
10 |
-
from spacy import glossary
|
11 |
-
|
12 |
-
entities = ["CARDINAL", "DATE", "EVENT", "FAC", "GPE", "LANGUAGE", "LAW", "LOC", "MONEY", "NORP", "ORDINAL", "ORG", "PERCENT", "PERSON", "PRODUCT", "QUANTITY", "TIME", "WORK_OF_ART"]
|
13 |
-
ent_dict = glossary.GLOSSARY
|
14 |
-
ent_sum = [f'<b>{ent}</b> = <i>{ent_dict[ent]}</i>' for ent in entities ]
|
15 |
|
16 |
with gr.Blocks() as demo:
|
17 |
gr.Markdown(
|
18 |
f"""
|
19 |
-
<div style="display: block; text-align: left; padding:0; margin:0;">
|
20 |
-
<h1 style="text-align: center">Babel Machine Demo</h1>
|
21 |
-
<p>This is a demo for text classification using language models finetuned on data labeled by <a href="https://www.comparativeagendas.net/">CAP</a>, <a href="https://manifesto-project.wzb.eu/">Manifesto Project</a>, sentiment, and emotion coding systems.<br>
|
22 |
For the coding of complete datasets, please visit the official <a href="https://babel.poltextlab.com/">Babel Machine</a> site.<br>
|
23 |
Please note that named entity inputs are case sensitive.<br>
|
24 |
-
|
25 |
-
{' , '.join(ent_sum)}</p>
|
26 |
</div>
|
27 |
""")
|
28 |
|
|
|
7 |
from interfaces.ner import demo as ner_demo
|
8 |
from interfaces.ner import download_models as download_spacy_models
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
with gr.Blocks() as demo:
|
12 |
gr.Markdown(
|
13 |
f"""
|
14 |
+
<div style="display: block; text-align: left; padding:0; margin:0;font-family: "Source Sans Pro", Helvetica, sans-serif;">
|
15 |
+
<h1 style="text-align: center;font-size: 17pt;">Babel Machine Demo</h1>
|
16 |
+
<p style="font-size: 14pt;">This is a demo for text classification using language models finetuned on data labeled by <a href="https://www.comparativeagendas.net/">CAP</a>, <a href="https://manifesto-project.wzb.eu/">Manifesto Project</a>, sentiment, and emotion coding systems.<br>
|
17 |
For the coding of complete datasets, please visit the official <a href="https://babel.poltextlab.com/">Babel Machine</a> site.<br>
|
18 |
Please note that named entity inputs are case sensitive.<br>
|
19 |
+
</p>
|
|
|
20 |
</div>
|
21 |
""")
|
22 |
|