Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -150,7 +150,6 @@ def translate_text(text, source_lang, target_lang):
|
|
| 150 |
num_return_sequences=1,
|
| 151 |
)
|
| 152 |
full_output = tokenizer.decode(translated_chunk[0], skip_special_tokens=True)
|
| 153 |
-
full_output = full_output.replace(input_text,"")
|
| 154 |
yield full_output
|
| 155 |
except Exception as e:
|
| 156 |
yield f"翻译出错: {str(e)}"
|
|
|
|
| 150 |
num_return_sequences=1,
|
| 151 |
)
|
| 152 |
full_output = tokenizer.decode(translated_chunk[0], skip_special_tokens=True)
|
|
|
|
| 153 |
yield full_output
|
| 154 |
except Exception as e:
|
| 155 |
yield f"翻译出错: {str(e)}"
|