How to change the examples displayed in the model card?

Hello, I’m fine tuning an NLP model and wanted to know how to change the examples that are displayed in the model card when pushing the model to the hub.

This are my training arguments:

from transformers import TrainingArguments

batch_size = 64
# Show the training loss with every epoch
logging_steps = len(downsampled_dataset["train"]) // batch_size
model_name = model_checkpoint.split("/")[-1]

training_args = TrainingArguments(
    output_dir=f"{model_name}-finetuned-spanish-corpus",
    overwrite_output_dir=True,
    evaluation_strategy="epoch",
    learning_rate=2e-5,
    weight_decay=0.01,
    per_device_train_batch_size=batch_size,
    per_device_eval_batch_size=batch_size,
    push_to_hub=True,
    fp16=True, # boost in speed
    logging_steps=logging_steps,
)

Hi,

you will find doc about how to change your widget’s examples here: Widgets

Hope this helps

Thank you @julien-c !