Spaces:
Sleeping
Sleeping
darshil3011
commited on
Commit
•
88955e5
1
Parent(s):
6e16937
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
5 |
generator = pipeline('text-generation', model='gpt2')
|
6 |
|
7 |
def generate(text):
|
8 |
-
result = generator(text, max_length=
|
9 |
return result[0]["generated_text"]
|
10 |
|
11 |
examples = [
|
|
|
5 |
generator = pipeline('text-generation', model='gpt2')
|
6 |
|
7 |
def generate(text):
|
8 |
+
result = generator(text, max_length=50, num_return_sequences=1)
|
9 |
return result[0]["generated_text"]
|
10 |
|
11 |
examples = [
|