Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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) +
|
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)
|