Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -160,7 +160,7 @@ def eurollm_instruct(model_name, sl, tl, input_text):
|
|
| 160 |
outputs = model.generate(**inputs, max_new_tokens=512)
|
| 161 |
output = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 162 |
if f'{tl}:' in output:
|
| 163 |
-
output = output.rsplit(f'{tl}:')[-1].strip().replace('assistant\n', '')
|
| 164 |
return output
|
| 165 |
|
| 166 |
def nllb(model_name, sl, tl, input_text):
|
|
|
|
| 160 |
outputs = model.generate(**inputs, max_new_tokens=512)
|
| 161 |
output = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 162 |
if f'{tl}:' in output:
|
| 163 |
+
output = output.rsplit(f'{tl}:')[-1].strip().replace('assistant\n', '')
|
| 164 |
return output
|
| 165 |
|
| 166 |
def nllb(model_name, sl, tl, input_text):
|