DD0101 commited on
Commit
554652b
1 Parent(s): 0bb5657

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -3,6 +3,10 @@ import os
3
  import transformers
4
  from transformers import pipeline
5
  from transformers.pipelines.token_classification import TokenClassificationPipeline
 
 
 
 
6
 
7
  class MyPipeline(TokenClassificationPipeline):
8
  def preprocess(self, sentence, offset_mapping=None):
 
3
  import transformers
4
  from transformers import pipeline
5
  from transformers.pipelines.token_classification import TokenClassificationPipeline
6
+ import py_vncorenlp
7
+
8
+ py_vncorenlp.download_model(save_dir='/')
9
+ rdrsegmenter = py_vncorenlp.VnCoreNLP(annotators=["wseg"], save_dir='/')
10
 
11
  class MyPipeline(TokenClassificationPipeline):
12
  def preprocess(self, sentence, offset_mapping=None):