Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
-
os.system('python -m spacy download
|
| 4 |
import spacy
|
| 5 |
from spacy import displacy
|
| 6 |
|
| 7 |
-
nlp = spacy.load("
|
| 8 |
|
| 9 |
def text_analysis(text):
|
| 10 |
doc = nlp(text)
|
|
@@ -30,8 +30,7 @@ demo = gr.Interface(
|
|
| 30 |
gr.Textbox(placeholder="Enter sentence here..."),
|
| 31 |
["highlight", "json", "html"],
|
| 32 |
examples=[
|
| 33 |
-
["
|
| 34 |
-
["It was the best of times, it was the worst of times."],
|
| 35 |
],
|
| 36 |
)
|
| 37 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
+
os.system('python -m spacy download jp_core_web_sm')
|
| 4 |
import spacy
|
| 5 |
from spacy import displacy
|
| 6 |
|
| 7 |
+
nlp = spacy.load("jp_core_web_sm")
|
| 8 |
|
| 9 |
def text_analysis(text):
|
| 10 |
doc = nlp(text)
|
|
|
|
| 30 |
gr.Textbox(placeholder="Enter sentence here..."),
|
| 31 |
["highlight", "json", "html"],
|
| 32 |
examples=[
|
| 33 |
+
["お前はもう死んでいる"],
|
|
|
|
| 34 |
],
|
| 35 |
)
|
| 36 |
|