FredZhang7
commited on
Commit
•
96f138d
1
Parent(s):
b0df11a
Fixed another typo
Browse files
README.md
CHANGED
@@ -44,10 +44,10 @@ from transformers import pipeline
|
|
44 |
nlp = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
45 |
ins = "a beautiful city"
|
46 |
|
47 |
-
# generate
|
48 |
outs = nlp(ins, max_length=80, num_return_sequences=10)
|
49 |
|
50 |
-
# print the
|
51 |
for i in range(len(outs)):
|
52 |
outs[i] = str(outs[i]['generated_text']).replace(' ', '')
|
53 |
print('\033[96m' + ins + '\033[0m')
|
|
|
44 |
nlp = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
45 |
ins = "a beautiful city"
|
46 |
|
47 |
+
# generate 10 samples
|
48 |
outs = nlp(ins, max_length=80, num_return_sequences=10)
|
49 |
|
50 |
+
# print the 10 samples
|
51 |
for i in range(len(outs)):
|
52 |
outs[i] = str(outs[i]['generated_text']).replace(' ', '')
|
53 |
print('\033[96m' + ins + '\033[0m')
|