Please help me!!!

#1
by Mzh666 - opened

Hello, how can I turn my own image dataset with descriptions into parquet format?

Hi,
So, when you have prepare the text-image dataset, it should be like the following:
dataset_folder/images, metadata.csv
NOTE: Inside metadata.csv you should have file_name, text and two columns

Then simply load your dataset from your local directory like this:
from datasets import load_dataset
dataset = load_dataset(“imagefolder”, data_dir=“dataset_folder”, split=“train”)
Now before uploading your dataset to hub, create a new dataset on your Hugging Face profile, if you set the dataset name to for example, "username/dataset_1" then in the next step you are ready to upload
Now login to your Hugging Face with CLI
Then upload to hud:
dataset.push_to_hub(“username/dataset_1”)

After pushing it to the hub, Hugging Face will automatically put it in parquet format. So, long story short, uploading via hugging face API, your dataset will be in parquet format.

Sorry for the late reply! Keep hustling! :)

Sign up or log in to comment