Spaces:
Runtime error
Runtime error
Update src/demo.py
Browse files- src/demo.py +3 -0
src/demo.py
CHANGED
|
@@ -40,6 +40,9 @@ def generate(input_text, sys_prompt) -> str:
|
|
| 40 |
|
| 41 |
result = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
return result
|
| 44 |
|
| 45 |
|
|
|
|
| 40 |
|
| 41 |
result = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|
| 42 |
|
| 43 |
+
result = result.split(' [/INST]')
|
| 44 |
+
result = result[0] + '\n\n' + result[1]
|
| 45 |
+
|
| 46 |
return result
|
| 47 |
|
| 48 |
|