bluenevus commited on
Commit
28b8cb5
·
verified ·
1 Parent(s): c8499b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -14,7 +14,12 @@ import numpy as np
14
  from pyannote.audio import Pipeline
15
 
16
  # Initialize the speaker diarization pipeline
17
- pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")
 
 
 
 
 
18
 
19
  # Check if CUDA is available and set the device
20
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
14
  from pyannote.audio import Pipeline
15
 
16
  # Initialize the speaker diarization pipeline
17
+ try:
18
+ pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")
19
+ print("Speaker diarization pipeline initialized successfully")
20
+ except Exception as e:
21
+ print(f"Error initializing speaker diarization pipeline: {str(e)}")
22
+ pipeline = None
23
 
24
  # Check if CUDA is available and set the device
25
  device = "cuda" if torch.cuda.is_available() else "cpu"