test pipeline
Browse files
test.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
|
3 |
+
|
4 |
+
pipe = pipeline(
|
5 |
+
task="hive-token-classification",
|
6 |
+
model="Hiveurban/dictabert-large-parse",
|
7 |
+
trust_remote_code=True,
|
8 |
+
)
|
9 |
+
|
10 |
+
sentence = '讘砖谞转 1948 讛砖诇讬诐 讗驻专讬诐 拽讬砖讜谉 讗转 诇讬诪讜讚讬讜 讘驻讬住讜诇 诪转讻转 讜讘转讜诇讚讜转 讛讗诪谞讜转 讜讛讞诇 诇驻专住诐 诪讗诪专讬诐 讛讜诪讜专讬住讟讬讬诐'
|
11 |
+
print(pipe([sentence]))
|