Spaces:
Running
on
Zero
Running
on
Zero
Update app_nobatching.py
Browse files- 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)
|