Instructions to use fiveflow/roberta-base-spacing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fiveflow/roberta-base-spacing with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="fiveflow/roberta-base-spacing")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("fiveflow/roberta-base-spacing") model = AutoModelForTokenClassification.from_pretrained("fiveflow/roberta-base-spacing", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -7,6 +7,11 @@ pipeline_tag: token-classification
|
|
| 7 |
|
| 8 |
```python
|
| 9 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
org_text = "ํ์์ค๋ฆฝ๊ณผESG๊ฒฝ์์๋ํ์ฌํ์ ์๊ตฌํ๋".replace(" ", "") # ๊ณต๋ฐฑ์ ๊ฑฐ
|
| 11 |
label = ["UNK", "PAD", "O", "B", "I", "E", "S"]
|
| 12 |
# char ๋จ์๋ก ํ ํฐํ
|
|
|
|
| 7 |
|
| 8 |
```python
|
| 9 |
import torch
|
| 10 |
+
from transformers import AutoModelForTokenClassification, AutoTokenizer, AutoConfig
|
| 11 |
+
|
| 12 |
+
tokenizer = AutoTokenizer.from_pretrained("fiveflow/roberta-base-spacing")
|
| 13 |
+
roberta = AutoModelForTokenClassification.from_pretrained("fiveflow/roberta-base-spacing")
|
| 14 |
+
|
| 15 |
org_text = "ํ์์ค๋ฆฝ๊ณผESG๊ฒฝ์์๋ํ์ฌํ์ ์๊ตฌํ๋".replace(" ", "") # ๊ณต๋ฐฑ์ ๊ฑฐ
|
| 16 |
label = ["UNK", "PAD", "O", "B", "I", "E", "S"]
|
| 17 |
# char ๋จ์๋ก ํ ํฐํ
|