Make "image" column appear first in dataset preview UI

Hi! :waving_hand:

I’m currently uploading a dataset that includes an "image" column (PNG files), along with some metadata columns. The dataset is loaded from a .jsonl file. My goal is to have the "image" column appear as the first column in the dataset card preview UI on the :hugs: Hub.

However, at the moment, the "image" column is not the first—in fact, it appears last, which is not ideal for the presentation I’d like to achieve.

I have a couple of questions:

  • Is there a way to force the dataset card to display the "image" column first?
  • Is there currently any way to control or influence the column order in the dataset preview UI?
  • Does the order of keys in the .jsonl file or the features argument affect the display order?

Thanks again for your time and help! :blush:

1 Like

Does the order of keys in the .jsonl file or the features argument affect the display order?

That’s probably true for datasets that have been loaded and saved in the datasets library.

However, if you simply upload image files as-is, I believe the order information will be automatically supplemented, so if you want to maintain the order in the viewer, you may need to manually create a settings file.

The most reliable method is to convert the data to the parquet format using the datasets library (simply load and save).

Thank you!! I will check it!
:flexed_biceps:

1 Like