Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ pipe = pipeline("text-generation", model="openai-community/gpt2")
|
|
| 6 |
|
| 7 |
# Define the function for text generation
|
| 8 |
def generate(text):
|
| 9 |
-
result =
|
| 10 |
return result[0]['generated_text']
|
| 11 |
|
| 12 |
# Define examples
|
|
|
|
| 6 |
|
| 7 |
# Define the function for text generation
|
| 8 |
def generate(text):
|
| 9 |
+
result = pipe(text, max_length=69, num_return_sequences=5)
|
| 10 |
return result[0]['generated_text']
|
| 11 |
|
| 12 |
# Define examples
|