|
from datasets import load_dataset |
|
from transformers import Trainer, TrainingArguments, Tacotron2ForConditionalGeneration |
|
|
|
|
|
dataset = load_dataset("m6011/sada2022") |
|
najdi_data = dataset.filter(lambda example: example['SpeakerDialect'] == 'Najdi') |
|
|
|
|
|
model = Tacotron2ForConditionalGeneration.from_pretrained("facebook/tacotron2") |
|
|
|
|
|
training_args = TrainingArguments(output_dir="./results", per_device_train_batch_size=16, num_train_epochs=3) |
|
trainer = Trainer(model=model, args=training_args, train_dataset=najdi_data) |
|
|
|
|
|
trainer.train() |
|
|