Commit
·
a836d61
1
Parent(s):
9df3a2f
update
Browse files
app.py
CHANGED
|
@@ -85,7 +85,7 @@ def extract_entities(sentence):
|
|
| 85 |
# Create Gradio interface
|
| 86 |
def ner_app_interface():
|
| 87 |
input_sentence = gr.Textbox(
|
| 88 |
-
lines=5, label="Input Sentence", placeholder="Enter a sentence for NER
|
| 89 |
)
|
| 90 |
output_entities = gr.HTML(label="Extracted Entities")
|
| 91 |
|
|
@@ -98,8 +98,33 @@ def ner_app_interface():
|
|
| 98 |
description="Enter a sentence to extract named entities using the NER model from the Impresso project.",
|
| 99 |
examples=[
|
| 100 |
[
|
| 101 |
-
"
|
| 102 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
],
|
| 104 |
live=False,
|
| 105 |
)
|
|
|
|
| 85 |
# Create Gradio interface
|
| 86 |
def ner_app_interface():
|
| 87 |
input_sentence = gr.Textbox(
|
| 88 |
+
lines=5, label="Input Sentence", placeholder="Enter a sentence for NER:"
|
| 89 |
)
|
| 90 |
output_entities = gr.HTML(label="Extracted Entities")
|
| 91 |
|
|
|
|
| 98 |
description="Enter a sentence to extract named entities using the NER model from the Impresso project.",
|
| 99 |
examples=[
|
| 100 |
[
|
| 101 |
+
"Des chercheurs de l'Université de Cambridge ont développé une nouvelle technique de calcul quantique qui promet d'augmenter exponentiellement les vitesses de calcul."
|
| 102 |
+
],
|
| 103 |
+
[
|
| 104 |
+
"Le rapport complet sur ces découvertes a été publié dans la prestigieuse revue 'Nature Physics'. (Reuters)"
|
| 105 |
+
],
|
| 106 |
+
["In the year 1789, the Estates-General was convened in France."],
|
| 107 |
+
[
|
| 108 |
+
"The event was held at the Palace of Versailles, a symbol of French monarchy."
|
| 109 |
+
],
|
| 110 |
+
[
|
| 111 |
+
"At Versailles, Marie Antoinette, the Queen of France, was involved in discussions."
|
| 112 |
+
],
|
| 113 |
+
[
|
| 114 |
+
"Maximilien Robespierre, a leading member of the National Assembly, also participated."
|
| 115 |
+
],
|
| 116 |
+
[
|
| 117 |
+
"Jean-Jacques Rousseau, the famous philosopher, was a significant figure in the debate."
|
| 118 |
+
],
|
| 119 |
+
[
|
| 120 |
+
"Another important participant was Charles de Talleyrand, the Bishop of Autun."
|
| 121 |
+
],
|
| 122 |
+
[
|
| 123 |
+
"Meanwhile, across the Atlantic, George Washington, the first President of the United States, was shaping policies."
|
| 124 |
+
],
|
| 125 |
+
[
|
| 126 |
+
"Thomas Jefferson, the nation's Secretary of State, played a key role in drafting policies for the new American government."
|
| 127 |
+
],
|
| 128 |
],
|
| 129 |
live=False,
|
| 130 |
)
|