Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,6 +42,9 @@ SAMPLE_RATE = 16_000
|
|
42 |
dia_model = Pipeline.from_pretrained("pyannote/speaker-diarization", use_auth_token=os.environ['TOKEN'])
|
43 |
vad_model = Pipeline.from_pretrained("pyannote/voice-activity-detection", use_auth_token=os.environ['TOKEN'])
|
44 |
|
|
|
|
|
|
|
45 |
import torch
|
46 |
from transformers import pipeline
|
47 |
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
|
|
|
42 |
dia_model = Pipeline.from_pretrained("pyannote/speaker-diarization", use_auth_token=os.environ['TOKEN'])
|
43 |
vad_model = Pipeline.from_pretrained("pyannote/voice-activity-detection", use_auth_token=os.environ['TOKEN'])
|
44 |
|
45 |
+
dia_model = dia_model.to(torch.device('cuda'))
|
46 |
+
vad_model = vad_model.to(torch.device('cuda'))
|
47 |
+
|
48 |
import torch
|
49 |
from transformers import pipeline
|
50 |
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
|