Spaces:
Runtime error
Runtime error
Update train.py
Browse files
train.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from transformers import
|
| 2 |
from datasets import Dataset
|
| 3 |
|
| 4 |
|
|
@@ -28,7 +28,7 @@ def init():
|
|
| 28 |
# Load the model and tokenizer
|
| 29 |
model_name = "language-ml-lab/AzerBert" # Replace with your model name if different
|
| 30 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
| 31 |
-
model =
|
| 32 |
chunk_size = 512
|
| 33 |
|
| 34 |
# Load the plain text (replace with your actual loading logic)
|
|
|
|
| 1 |
+
from transformers import BertModel, BertTokenizer, TrainingArguments, Trainer
|
| 2 |
from datasets import Dataset
|
| 3 |
|
| 4 |
|
|
|
|
| 28 |
# Load the model and tokenizer
|
| 29 |
model_name = "language-ml-lab/AzerBert" # Replace with your model name if different
|
| 30 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
| 31 |
+
model = BertModel.from_pretrained(model_name)
|
| 32 |
chunk_size = 512
|
| 33 |
|
| 34 |
# Load the plain text (replace with your actual loading logic)
|