FredZhang7 commited on
Commit
1bb2387
1 Parent(s): 5933835

Add download example

Browse files
Files changed (1) hide show
  1. README.md +20 -1
README.md CHANGED
@@ -15,4 +15,23 @@ Combined text-only dataset from
15
  - bartman081523/stable-diffusion-discord-prompts
16
  - FredZhang7/krea-ai-prompts
17
 
18
- For preprocessing methods, please see [Fast GPT2 PromptGen](https://huggingface.co/FredZhang7/distilgpt2-stable-diffusion-v2).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  - bartman081523/stable-diffusion-discord-prompts
16
  - FredZhang7/krea-ai-prompts
17
 
18
+ For preprocessing methods, please see [Fast GPT2 PromptGen](https://huggingface.co/FredZhang7/distilgpt2-stable-diffusion-v2).
19
+
20
+ ---
21
+
22
+ Download the dataset to `all_prompts.txt` locally.
23
+ ```bash
24
+ pip install datasets
25
+ ```
26
+ ```python
27
+ import datasets
28
+
29
+ dataset = datasets.load_dataset("FredZhang7/stable-diffusion-prompts-2.47M")
30
+
31
+ train = dataset["train"]
32
+ prompts = train["text"]
33
+
34
+ with open("all_prompts.txt", "w") as f:
35
+ for prompt in prompts:
36
+ f.write(prompt + "\n")
37
+ ```