init
Browse files
training_scripts/finetune_t5.py
CHANGED
@@ -227,7 +227,7 @@ def upload(
|
|
227 |
tokenizer.push_to_hub(model_alias, **args)
|
228 |
repo = Repository(model_alias, f'{model_organization}/{model_alias}')
|
229 |
copy_tree(f'{output_dir}/best_model', model_alias)
|
230 |
-
dataset_instance = load_dataset(dataset, dataset_name, split='
|
231 |
sample = [i[dataset_column_text] for i in dataset_instance]
|
232 |
sample = [i for i in sample if ''' not in i and ''' not in i][:3]
|
233 |
widget = '\n'.join([f"- text: '{t}'\n example_title: example {_n + 1}" for _n, t in enumerate(sample)])
|
|
|
227 |
tokenizer.push_to_hub(model_alias, **args)
|
228 |
repo = Repository(model_alias, f'{model_organization}/{model_alias}')
|
229 |
copy_tree(f'{output_dir}/best_model', model_alias)
|
230 |
+
dataset_instance = load_dataset(dataset, dataset_name, split='validation', use_auth_token=use_auth_token)
|
231 |
sample = [i[dataset_column_text] for i in dataset_instance]
|
232 |
sample = [i for i in sample if ''' not in i and ''' not in i][:3]
|
233 |
widget = '\n'.join([f"- text: '{t}'\n example_title: example {_n + 1}" for _n, t in enumerate(sample)])
|