Spaces:
Sleeping
Sleeping
howard-hou
commited on
Commit
•
cded6a9
1
Parent(s):
9cb62bd
Update app.py
Browse files
app.py
CHANGED
@@ -94,6 +94,8 @@ def generate(
|
|
94 |
token = pipeline.sample_logits(out, temperature=args.temperature, top_p=args.top_p)
|
95 |
if token in args.token_stop:
|
96 |
break
|
|
|
|
|
97 |
all_tokens += [token]
|
98 |
for xxx in occurrence:
|
99 |
occurrence[xxx] *= 0.996
|
|
|
94 |
token = pipeline.sample_logits(out, temperature=args.temperature, top_p=args.top_p)
|
95 |
if token in args.token_stop:
|
96 |
break
|
97 |
+
if '\n\n' in out_str:
|
98 |
+
break
|
99 |
all_tokens += [token]
|
100 |
for xxx in occurrence:
|
101 |
occurrence[xxx] *= 0.996
|