Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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):
|