sonobit commited on
Commit
b6a9da6
·
1 Parent(s): e9455b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  import os
3
- os.system('python -m spacy download en_core_web_sm')
4
  import spacy
5
  from spacy import displacy
6
 
7
- nlp = spacy.load("en_core_web_sm")
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
- ["What a beautiful morning for a walk!"],
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