Spaces:
Runtime error
Runtime error
Update diarization.py
Browse files- diarization.py +4 -7
diarization.py
CHANGED
|
@@ -5,14 +5,11 @@ Pyannote-audio ile konuşmacı ayrımı (kim ne zaman konuşuyor).
|
|
| 5 |
|
| 6 |
import os
|
| 7 |
from typing import List, Tuple, Optional
|
| 8 |
-
import torch
|
| 9 |
|
| 10 |
-
# PyTorch 2.6+ compatibility
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
except (AttributeError, ImportError):
|
| 15 |
-
pass # Older PyTorch versions don't need this fix
|
| 16 |
|
| 17 |
# Check for GPU availability
|
| 18 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
| 5 |
|
| 6 |
import os
|
| 7 |
from typing import List, Tuple, Optional
|
|
|
|
| 8 |
|
| 9 |
+
# PyTorch 2.6+ compatibility: Disable weights_only restriction for pyannote models
|
| 10 |
+
os.environ["TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD"] = "1"
|
| 11 |
+
|
| 12 |
+
import torch
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Check for GPU availability
|
| 15 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|