Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ try:
|
|
24 |
"pyannote/speaker-diarization-3.1",
|
25 |
use_auth_token=os.environ["HF_TOKEN"]
|
26 |
)
|
27 |
-
device = torch.device(
|
28 |
diarization_pipeline.to(device)
|
29 |
except Exception as e:
|
30 |
print(f"Error initializing diarization pipeline: {e}")
|
|
|
24 |
"pyannote/speaker-diarization-3.1",
|
25 |
use_auth_token=os.environ["HF_TOKEN"]
|
26 |
)
|
27 |
+
device = torch.device('cuda' if torch.cuda.is_available() else "cpu")
|
28 |
diarization_pipeline.to(device)
|
29 |
except Exception as e:
|
30 |
print(f"Error initializing diarization pipeline: {e}")
|