Upload make_dataset.py
Browse files- make_dataset.py +10 -0
make_dataset.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
|
3 |
+
db = datasets.load_dataset('vivym/midjourney-prompts', cache_dir='./tmp')
|
4 |
+
|
5 |
+
captions = list(set(db['train']['prompt']))
|
6 |
+
|
7 |
+
print(len(captions))
|
8 |
+
|
9 |
+
dataset = datasets.Dataset.from_dict({"text": captions})
|
10 |
+
dataset.push_to_hub("Geonmo/midjourney-prompts-only")
|