Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,8 +30,7 @@ notes = """
|
|
30 |
- Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
|
31 |
"""
|
32 |
def sayPoetry(prompt, temp=1.0, topk = 50, topp = 1.0, penalty=1.0):
|
33 |
-
gen = pipe(prompt, max_length=96, temperature = temp, top_k=topk, top_p=topp, do_sample = True,
|
34 |
-
repetition_penalty=penalty)[0]["generated_text"]
|
35 |
poetry =""
|
36 |
for line in gen.split('.')[:-1]:
|
37 |
poetry += line #+ "\n"
|
|
|
30 |
- Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
|
31 |
"""
|
32 |
def sayPoetry(prompt, temp=1.0, topk = 50, topp = 1.0, penalty=1.0):
|
33 |
+
gen = pipe(prompt, max_length=96, temperature = temp, top_k=topk, top_p=topp, do_sample = True, repetition_penalty=penalty)[0]["generated_text"]
|
|
|
34 |
poetry =""
|
35 |
for line in gen.split('.')[:-1]:
|
36 |
poetry += line #+ "\n"
|