ZWEi-P commited on
Commit
609c930
1 Parent(s): a143715

Increased max_length

Browse files

Trying to reduce chances of generating abruptly ended prompts

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def generate(starting_text):
17
  starting_text: str = re.sub(r"[,:\-–.!;?_]", '', starting_text)
18
  print(starting_text)
19
 
20
- response = gpt2_pipe(starting_text, max_length=random.randint(60, 90), num_return_sequences=4)
21
  response_list = []
22
  for x in response:
23
  resp = x['generated_text'].strip()
 
17
  starting_text: str = re.sub(r"[,:\-–.!;?_]", '', starting_text)
18
  print(starting_text)
19
 
20
+ response = gpt2_pipe(starting_text, max_length=random.randint(120, 150), num_return_sequences=4)
21
  response_list = []
22
  for x in response:
23
  resp = x['generated_text'].strip()