Update README.md
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ config = AutoConfig.from_pretrained(
|
|
| 31 |
model_path,
|
| 32 |
trust_remote_code=True,
|
| 33 |
)
|
| 34 |
-
device = 'cpu'
|
| 35 |
model = BertForTokenClassification.from_pretrained(model_path, ).to(device)
|
| 36 |
def chunk_text(model,text:str, tokenizer, prob_threshold=0.5)->list[str]:
|
| 37 |
# slide context window chunking
|
|
|
|
| 31 |
model_path,
|
| 32 |
trust_remote_code=True,
|
| 33 |
)
|
| 34 |
+
device = 'cpu'# or cuda
|
| 35 |
model = BertForTokenClassification.from_pretrained(model_path, ).to(device)
|
| 36 |
def chunk_text(model,text:str, tokenizer, prob_threshold=0.5)->list[str]:
|
| 37 |
# slide context window chunking
|