nikolltt commited on
Commit
ee3be79
·
verified ·
1 Parent(s): 9f28380

Update quotes.csv

Browse files
Files changed (1) hide show
  1. quotes.csv +10 -0
quotes.csv CHANGED
@@ -1,4 +1,14 @@
1
  quote
 
 
 
 
 
 
 
 
 
 
2
  "Creativity starts with a single idea."
3
  "Small experiments lead to big discoveries."
4
  "Design with people, not at them."
 
1
  quote
2
+ from transformers import pipeline
3
+ import pandas as pd
4
+
5
+ gen = pipeline("text-generation", model="gpt2")
6
+ texts = []
7
+ for i in range(200): # run multiple times to reach ~1,000
8
+ out = gen("Short inspirational quote:", max_length=25, num_return_sequences=1)[0]["generated_text"].strip()
9
+ texts.append(out.replace("\n", " "))
10
+ df = pd.DataFrame({"quote": texts})
11
+ df.to_csv("quotes.csv", index=False)
12
  "Creativity starts with a single idea."
13
  "Small experiments lead to big discoveries."
14
  "Design with people, not at them."