Harshveer commited on
Commit
e28490f
Β·
1 Parent(s): 555640c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def generate(starting_text):
24
  response_list = []
25
  for x in response:
26
  resp = x['generated_text'].strip()
27
- if resp != starting_text and len(resp) > (len(starting_text) + 4) and resp.endswith((":", "-", "β€”")) is False:
28
  response_list.append(resp+'\n')
29
  response_end = "\n".join(response_list)
30
  response_end = re.sub('[^ ]+\.[^ ]+','', response_end)
 
24
  response_list = []
25
  for x in response:
26
  resp = x['generated_text'].strip()
27
+ if resp != starting_text and len(resp) > (len(starting_text) + 1) and resp.endswith((":", "-", "β€”")) is False:
28
  response_list.append(resp+'\n')
29
  response_end = "\n".join(response_list)
30
  response_end = re.sub('[^ ]+\.[^ ]+','', response_end)