Update
Browse files
app.py
CHANGED
@@ -6,12 +6,10 @@ from flair.models import SequenceTagger
|
|
6 |
# Load the model
|
7 |
model = SequenceTagger.load("qanastek/pos-french")
|
8 |
|
9 |
-
def
|
10 |
|
11 |
# George Washington est allé à Washington
|
12 |
|
13 |
-
# res = "Hello " + content + "!!"
|
14 |
-
|
15 |
sentence = Sentence(content)
|
16 |
|
17 |
# predict tags
|
@@ -22,5 +20,10 @@ def greet(content):
|
|
22 |
|
23 |
return res
|
24 |
|
25 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
26 |
iface.launch()
|
|
|
6 |
# Load the model
|
7 |
model = SequenceTagger.load("qanastek/pos-french")
|
8 |
|
9 |
+
def getPartOfSpeechFR(content):
|
10 |
|
11 |
# George Washington est allé à Washington
|
12 |
|
|
|
|
|
13 |
sentence = Sentence(content)
|
14 |
|
15 |
# predict tags
|
|
|
20 |
|
21 |
return res
|
22 |
|
23 |
+
iface = gr.Interface(
|
24 |
+
title="🥖 French Part Of Speech Tagging",
|
25 |
+
fn=getPartOfSpeechFR,
|
26 |
+
inputs="textbox",
|
27 |
+
outputs="textbox",
|
28 |
+
)
|
29 |
iface.launch()
|