Spaces:
Runtime error
Runtime error
Commit ·
c940cf6
1
Parent(s): f2a39ce
Add DictaLM 2.0 instruct model
Browse files
app.py
CHANGED
|
@@ -69,7 +69,7 @@ def predict():
|
|
| 69 |
# Decode the output
|
| 70 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).replace(formatted_text, '').strip()
|
| 71 |
|
| 72 |
-
# Remove
|
| 73 |
if "[/INST]" in prediction:
|
| 74 |
prediction = prediction.split("[/INST]", 1)[-1].strip()
|
| 75 |
|
|
|
|
| 69 |
# Decode the output
|
| 70 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).replace(formatted_text, '').strip()
|
| 71 |
|
| 72 |
+
# Remove user input part from the response
|
| 73 |
if "[/INST]" in prediction:
|
| 74 |
prediction = prediction.split("[/INST]", 1)[-1].strip()
|
| 75 |
|