Spaces:
Sleeping
Sleeping
Update tasks/text.py
Browse files- tasks/text.py +7 -3
tasks/text.py
CHANGED
|
@@ -71,9 +71,13 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
| 71 |
def preprocess_function(df):
|
| 72 |
return tokenizer(df["quote"], truncation=True)
|
| 73 |
tokenized_test = test_dataset.map(preprocess_function, batched=True)
|
| 74 |
-
|
| 75 |
-
training_args =
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
trainer = Trainer(
|
| 79 |
model=model,
|
|
|
|
| 71 |
def preprocess_function(df):
|
| 72 |
return tokenizer(df["quote"], truncation=True)
|
| 73 |
tokenized_test = test_dataset.map(preprocess_function, batched=True)
|
| 74 |
+
|
| 75 |
+
training_args = TrainingArguments(
|
| 76 |
+
output_dir="./results",
|
| 77 |
+
per_device_eval_batch_size=16,
|
| 78 |
+
logging_dir="./logs",
|
| 79 |
+
logging_steps=10,
|
| 80 |
+
)
|
| 81 |
|
| 82 |
trainer = Trainer(
|
| 83 |
model=model,
|