gcc12m_caption_only / make_dataset.py
Geonmo's picture
Upload make_dataset.py
681c304
raw
history blame contribute delete
306 Bytes
import pandas as pd
from datasets import Dataset
# https://storage.googleapis.com/conceptual_12m/cc12m.tsv
csv = pd.read_csv("cc12m.tsv", sep="\t", names=["image_url", "caption"])
captions = csv["caption"]
dataset = Dataset.from_dict({"text": captions})
dataset.push_to_hub("Geonmo/gcc12m_caption_only")