Spaces:
Sleeping
Sleeping
Update server.py
Browse files
server.py
CHANGED
|
@@ -178,9 +178,8 @@ def generate_full_response(model, tokenizer, prompt, max_new_tokens=256, temp=0.
|
|
| 178 |
if any(punct in new_text for punct in ['.', '!', '?', '\n']):
|
| 179 |
break
|
| 180 |
|
| 181 |
-
# Return the
|
| 182 |
-
|
| 183 |
-
return full_output[len(prompt):].strip()
|
| 184 |
|
| 185 |
# ==============================================================================
|
| 186 |
# 4. LOAD MODEL & TOKENIZER ON STARTUP
|
|
|
|
| 178 |
if any(punct in new_text for punct in ['.', '!', '?', '\n']):
|
| 179 |
break
|
| 180 |
|
| 181 |
+
# 🚀 FIXED: Return the full, unbroken string (Prompt + Continuation)
|
| 182 |
+
return tokenizer.decode(gen_ids)
|
|
|
|
| 183 |
|
| 184 |
# ==============================================================================
|
| 185 |
# 4. LOAD MODEL & TOKENIZER ON STARTUP
|