FredZhang7
commited on
Commit
•
24e156f
1
Parent(s):
6af78e4
Fix formatting, add code
Browse files
README.md
CHANGED
@@ -20,4 +20,27 @@ For disclaimers about the Danbooru data, please see [Danbooru Tag Generator](htt
|
|
20 |
|
21 |
## 100K unique prompts
|
22 |
- `danbooru_raw`: Raw prompts with upscore ≥ 3 from Danbooru API
|
23 |
-
- `danbooru_clean`: Cleaned prompts with upscore ≥
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
## 100K unique prompts
|
22 |
- `danbooru_raw`: Raw prompts with upscore ≥ 3 from Danbooru API
|
23 |
+
- `danbooru_clean`: Cleaned prompts with upscore ≥ 3 from Danbooru API
|
24 |
+
|
25 |
+
|
26 |
+
## Python
|
27 |
+
```bash
|
28 |
+
pip install datasets
|
29 |
+
```
|
30 |
+
```python
|
31 |
+
import csv
|
32 |
+
import datasets
|
33 |
+
|
34 |
+
dataset = datasets.load_dataset("FredZhang7/anime-prompts-180K")
|
35 |
+
|
36 |
+
train = dataset["train"]
|
37 |
+
safebooru_clean = train["safebooru_clean"]
|
38 |
+
danbooru_clean = train["danbooru_clean"]
|
39 |
+
danbooru_raw = train["danbooru_raw"]
|
40 |
+
|
41 |
+
with open("anime_prompts.csv", "w") as f:
|
42 |
+
writer = csv.writer(f)
|
43 |
+
writer.writerow(["safebooru_clean", "danbooru_clean", "danbooru_raw"])
|
44 |
+
for i in range(len(safebooru_clean)):
|
45 |
+
writer.writerow([safebooru_clean[i], danbooru_clean[i], danbooru_raw[i]])
|
46 |
+
```
|