Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,13 @@ import torch
|
|
| 11 |
# processor = WhisperProcessor.from_pretrained(model_name)
|
| 12 |
# model = WhisperForConditionalGeneration.from_pretrained(model_name)
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# 加载数据集 bigcode/the-stack
|
| 17 |
|
|
|
|
| 11 |
# processor = WhisperProcessor.from_pretrained(model_name)
|
| 12 |
# model = WhisperForConditionalGeneration.from_pretrained(model_name)
|
| 13 |
|
| 14 |
+
model_id = "openai/whisper-large-v3-turbo"
|
| 15 |
+
|
| 16 |
+
models = AutoModelForSpeechSeq2Seq.from_pretrained(
|
| 17 |
+
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
model = pipeline("automatic-speech-recognition", model=models, chunk_length_s=30, device=0)
|
| 21 |
|
| 22 |
# 加载数据集 bigcode/the-stack
|
| 23 |
|