Instructions to use yxdu/ESRT-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yxdu/ESRT-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="yxdu/ESRT-4B", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yxdu/ESRT-4B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update srt_model.py
Browse files- srt_model.py +1 -1
srt_model.py
CHANGED
|
@@ -268,7 +268,7 @@ class CustomSLM(PreTrainedModel):
|
|
| 268 |
|
| 269 |
|
| 270 |
@torch.no_grad()
|
| 271 |
-
def translate_encode(self,
|
| 272 |
device = self.device
|
| 273 |
dtype = self.dtype
|
| 274 |
|
|
|
|
| 268 |
|
| 269 |
|
| 270 |
@torch.no_grad()
|
| 271 |
+
def translate_encode(self, mels):
|
| 272 |
device = self.device
|
| 273 |
dtype = self.dtype
|
| 274 |
|