MindLabUnimib commited on
Commit
c58078e
·
verified ·
1 Parent(s): a5157ac

Update app_nobatching.py

Browse files
Files changed (1) hide show
  1. app_nobatching.py +1 -1
app_nobatching.py CHANGED
@@ -117,7 +117,7 @@ def generate(submission: list[dict[str, str]], team_id: str) -> list[dict[str, s
117
  # Decode only newly generated tokens (exclude input)
118
  generated_ids = output_ids[:, inputs.input_ids.shape[1] :]
119
  response = chat_tokenizer.decode(generated_ids[0], skip_special_tokens=True)
120
- responses.append(response)
121
 
122
  generation_time = time.perf_counter() - start_time
123
  times.append(generation_time)
 
117
  # Decode only newly generated tokens (exclude input)
118
  generated_ids = output_ids[:, inputs.input_ids.shape[1] :]
119
  response = chat_tokenizer.decode(generated_ids[0], skip_special_tokens=True)
120
+ responses.append(response.strip())
121
 
122
  generation_time = time.perf_counter() - start_time
123
  times.append(generation_time)