Update README.md
Browse files
README.md
CHANGED
@@ -78,11 +78,11 @@ This time, let's translate to French.
|
|
78 |
```python
|
79 |
>>> # from audio
|
80 |
>>> output_tokens = model.generate(**audio_inputs, tgt_lang="fra", generate_speech=False)
|
81 |
-
>>> translated_text_from_audio = processor.decode(output_tokens[0].tolist()
|
82 |
|
83 |
>>> # from text
|
84 |
>>> output_tokens = model.generate(**text_inputs, tgt_lang="fra", generate_speech=False)
|
85 |
-
>>> translated_text_from_text = processor.decode(output_tokens[0].tolist()
|
86 |
```
|
87 |
|
88 |
### Tips
|
|
|
78 |
```python
|
79 |
>>> # from audio
|
80 |
>>> output_tokens = model.generate(**audio_inputs, tgt_lang="fra", generate_speech=False)
|
81 |
+
>>> translated_text_from_audio = processor.decode(output_tokens[0].tolist(), skip_special_tokens=True)
|
82 |
|
83 |
>>> # from text
|
84 |
>>> output_tokens = model.generate(**text_inputs, tgt_lang="fra", generate_speech=False)
|
85 |
+
>>> translated_text_from_text = processor.decode(output_tokens[0].tolist(), skip_special_tokens=True)
|
86 |
```
|
87 |
|
88 |
### Tips
|