Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def infer(
|
|
45 |
occurrence = {}
|
46 |
state = None
|
47 |
for i in range(int(token_count)):
|
48 |
-
out, state = model.forward(pipeline.encode(ctx) if i == 0 else [token], state)
|
49 |
for n in args.token_ban:
|
50 |
out[n] = -float('inf')
|
51 |
for n in occurrence:
|
|
|
45 |
occurrence = {}
|
46 |
state = None
|
47 |
for i in range(int(token_count)):
|
48 |
+
out, state = model.forward(pipeline.encode(ctx)[:4096] if i == 0 else [token], state)
|
49 |
for n in args.token_ban:
|
50 |
out[n] = -float('inf')
|
51 |
for n in occurrence:
|