Spaces:
Runtime error
Runtime error
Commit
•
cf6173f
1
Parent(s):
cecf423
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
generator = pipeline('text-generation', model='AlekseyKorshuk/gpt2-jokes')
|
5 |
|
6 |
def generate(text):
|
7 |
-
result = generator(text, max_length=
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|
|
|
4 |
generator = pipeline('text-generation', model='AlekseyKorshuk/gpt2-jokes')
|
5 |
|
6 |
def generate(text):
|
7 |
+
result = generator(text, max_length=256, num_return_sequences=1, do_sample=True)
|
8 |
return result[0]["generated_text"]
|
9 |
|
10 |
examples = [
|