Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def generate(starting_text):
|
|
20 |
starting_text: str = re.sub(r"[,:\-β.!;?_]", '', starting_text)
|
21 |
print(starting_text)
|
22 |
|
23 |
-
response = gpt2_pipe(starting_text, max_length=random.randint(
|
24 |
response_list = []
|
25 |
for x in response:
|
26 |
resp = x['generated_text'].strip()
|
|
|
20 |
starting_text: str = re.sub(r"[,:\-β.!;?_]", '', starting_text)
|
21 |
print(starting_text)
|
22 |
|
23 |
+
response = gpt2_pipe(starting_text, max_length=random.randint(20, 45), num_return_sequences=random.randint(5, 15))
|
24 |
response_list = []
|
25 |
for x in response:
|
26 |
resp = x['generated_text'].strip()
|