Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ from pydub import AudioSegment
|
|
23 |
import torch
|
24 |
import torchaudio
|
25 |
import torchaudio.transforms as transforms
|
26 |
-
from transformers import
|
27 |
from huggingface_hub import model_info
|
28 |
import spacy
|
29 |
import networkx as nx
|
@@ -52,9 +52,8 @@ device = 0 if torch.cuda.is_available() else "cpu"
|
|
52 |
torch_dtype = torch.float32
|
53 |
|
54 |
# Load tokenizer and model
|
55 |
-
|
56 |
-
model =
|
57 |
-
processor = WhisperProcessor.from_pretrained("NbAiLab/nb-whisper-large")
|
58 |
|
59 |
|
60 |
# Model script does not support JIT compilation
|
|
|
23 |
import torch
|
24 |
import torchaudio
|
25 |
import torchaudio.transforms as transforms
|
26 |
+
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
|
27 |
from huggingface_hub import model_info
|
28 |
import spacy
|
29 |
import networkx as nx
|
|
|
52 |
torch_dtype = torch.float32
|
53 |
|
54 |
# Load tokenizer and model
|
55 |
+
processor = AutoProcessor.from_pretrained("NbAiLab/nb-whisper-large-verbatim")
|
56 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained("NbAiLab/nb-whisper-large-verbatim")
|
|
|
57 |
|
58 |
|
59 |
# Model script does not support JIT compilation
|