Spaces:
Runtime error
Runtime error
Commit
•
3e9899e
1
Parent(s):
c8b369a
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
5 |
|
6 |
def blog_gen(txt):
|
7 |
generator=pipeline(task='text-generation',model='gpt2')
|
8 |
-
gen_blog=generator(txt,max_length=
|
9 |
remove_gen_text = list(map(lambda x: x["generated_text"], gen_blog))
|
10 |
clean_text = list(map(lambda x: x.replace("\n\n", " "), remove_gen_text))
|
11 |
return clean_text
|
|
|
5 |
|
6 |
def blog_gen(txt):
|
7 |
generator=pipeline(task='text-generation',model='gpt2')
|
8 |
+
gen_blog=generator(txt,max_length=2000)
|
9 |
remove_gen_text = list(map(lambda x: x["generated_text"], gen_blog))
|
10 |
clean_text = list(map(lambda x: x.replace("\n\n", " "), remove_gen_text))
|
11 |
return clean_text
|