Kevin Fink
commited on
Commit
·
f2baba8
1
Parent(s):
85a2944
deve
Browse files
app.py
CHANGED
@@ -220,8 +220,8 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
|
|
220 |
dataset = load_dataset(dataset_name.strip())
|
221 |
|
222 |
#dataset['train'] = dataset['train'].select(range(8000))
|
223 |
-
dataset['train'] = dataset['train'].select(range(
|
224 |
-
dataset['validation'] = dataset['validation'].select(range(
|
225 |
train_set = dataset.map(tokenize_function, batched=True)
|
226 |
#valid_set = dataset['validation'].map(tokenize_function, batched=True)
|
227 |
|
@@ -242,7 +242,7 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
|
|
242 |
)
|
243 |
|
244 |
# Fine-tune the model
|
245 |
-
trainer.
|
246 |
#if os.path.exists(training_args.output_dir) and os.listdir(training_args.output_dir):
|
247 |
#train_result = trainer.train(resume_from_checkpoint=True)
|
248 |
#else:
|
|
|
220 |
dataset = load_dataset(dataset_name.strip())
|
221 |
|
222 |
#dataset['train'] = dataset['train'].select(range(8000))
|
223 |
+
dataset['train'] = dataset['train'].select(range(4000))
|
224 |
+
dataset['validation'] = dataset['validation'].select(range(200))
|
225 |
train_set = dataset.map(tokenize_function, batched=True)
|
226 |
#valid_set = dataset['validation'].map(tokenize_function, batched=True)
|
227 |
|
|
|
242 |
)
|
243 |
|
244 |
# Fine-tune the model
|
245 |
+
trainer.train()
|
246 |
#if os.path.exists(training_args.output_dir) and os.listdir(training_args.output_dir):
|
247 |
#train_result = trainer.train(resume_from_checkpoint=True)
|
248 |
#else:
|