muryshev commited on
Commit
b37e0f2
1 Parent(s): 3791896

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -280,6 +280,7 @@ def generate_response():
280
 
281
  response_tokens = ''
282
  def generate_and_log_tokens(model, generator):
 
283
  for token in generate_tokens(model, generator):
284
  if token == b'': # or (max_new_tokens is not None and i >= max_new_tokens):
285
  log(user_request, response_tokens.decode("utf-8", errors="ignore"))
 
280
 
281
  response_tokens = ''
282
  def generate_and_log_tokens(model, generator):
283
+ global response_tokens
284
  for token in generate_tokens(model, generator):
285
  if token == b'': # or (max_new_tokens is not None and i >= max_new_tokens):
286
  log(user_request, response_tokens.decode("utf-8", errors="ignore"))