BlinkDL commited on
Commit
ea9a0f9
1 Parent(s): 1c3978c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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: