Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ gc.collect()
|
|
8 |
def sayPoetry(prompt):
|
9 |
gen = pipe(prompt, max_length=96)[0]["generated_text"]
|
10 |
poetry =""
|
11 |
-
for line in gen
|
12 |
-
poetry += line
|
13 |
return poetry
|
14 |
|
15 |
tb = gr.Textbox(label="Enter your prompt or select from examples:", placeholder="أنا الذي", lines=1)
|
|
|
8 |
def sayPoetry(prompt):
|
9 |
gen = pipe(prompt, max_length=96)[0]["generated_text"]
|
10 |
poetry =""
|
11 |
+
for line in gen.split('.')[:-1]:
|
12 |
+
poetry += line
|
13 |
return poetry
|
14 |
|
15 |
tb = gr.Textbox(label="Enter your prompt or select from examples:", placeholder="أنا الذي", lines=1)
|