Update README.md
Browse files
README.md
CHANGED
|
@@ -56,7 +56,7 @@ def fast_detect_unknown(text: str) -> bool:
|
|
| 56 |
import torch
|
| 57 |
from transformers import pipeline
|
| 58 |
|
| 59 |
-
model_id = "chiennv/langid-mmbert-small
|
| 60 |
device = 0 if torch.cuda.is_available() else -1
|
| 61 |
clf = pipeline(
|
| 62 |
"text-classification",
|
|
@@ -80,7 +80,7 @@ else:
|
|
| 80 |
import torch
|
| 81 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 82 |
|
| 83 |
-
model_id = "chiennv/langid-mmbert-small
|
| 84 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 85 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 86 |
|
|
|
|
| 56 |
import torch
|
| 57 |
from transformers import pipeline
|
| 58 |
|
| 59 |
+
model_id = "chiennv/langid-mmbert-small"
|
| 60 |
device = 0 if torch.cuda.is_available() else -1
|
| 61 |
clf = pipeline(
|
| 62 |
"text-classification",
|
|
|
|
| 80 |
import torch
|
| 81 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 82 |
|
| 83 |
+
model_id = "chiennv/langid-mmbert-small"
|
| 84 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 85 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 86 |
|