Spaces:
Runtime error
Runtime error
Commit
·
bd3935d
1
Parent(s):
65589ea
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def generate(starting_text):
|
|
15 |
starting_text: str = line[random.randrange(0, len(line))].replace("\n", "").capitalize()
|
16 |
starting_text: str = re.sub(r"\.", '', starting_text)
|
17 |
|
18 |
-
response = gpt2_pipe(starting_text, max_length=(len(starting_text) + random.randint(
|
19 |
response_list = []
|
20 |
for x in response:
|
21 |
resp = x['generated_text'].strip()
|
|
|
15 |
starting_text: str = line[random.randrange(0, len(line))].replace("\n", "").capitalize()
|
16 |
starting_text: str = re.sub(r"\.", '', starting_text)
|
17 |
|
18 |
+
response = gpt2_pipe(starting_text, max_length=(len(starting_text) + random.randint(60, 80)), num_return_sequences=1)
|
19 |
response_list = []
|
20 |
for x in response:
|
21 |
resp = x['generated_text'].strip()
|