Spaces:
Paused
Paused
Update app.py
Browse files
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"))
|