Geonmo commited on
Commit
681c304
1 Parent(s): fe0b194

Upload make_dataset.py

Browse files
Files changed (1) hide show
  1. make_dataset.py +9 -0
make_dataset.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from datasets import Dataset
3
+
4
+ # https://storage.googleapis.com/conceptual_12m/cc12m.tsv
5
+ csv = pd.read_csv("cc12m.tsv", sep="\t", names=["image_url", "caption"])
6
+ captions = csv["caption"]
7
+
8
+ dataset = Dataset.from_dict({"text": captions})
9
+ dataset.push_to_hub("Geonmo/gcc12m_caption_only")