Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Correct missing import
Browse files- sonogram.py +2 -1
sonogram.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import sonogram_utility as su
|
| 2 |
from pyannote.audio import Pipeline
|
| 3 |
import pickle
|
|
|
|
| 4 |
|
| 5 |
class Sonogram():
|
| 6 |
|
|
@@ -27,7 +28,7 @@ class Sonogram():
|
|
| 27 |
if not self.isGPU:
|
| 28 |
print(f"GPU is not available")
|
| 29 |
self.device = torch.device("cuda" if self.isGPU else "cpu")
|
| 30 |
-
print(f"Using {device} instead.")
|
| 31 |
|
| 32 |
self.pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
|
| 33 |
self.pipeline.to(self.device)
|
|
|
|
| 1 |
import sonogram_utility as su
|
| 2 |
from pyannote.audio import Pipeline
|
| 3 |
import pickle
|
| 4 |
+
import torch
|
| 5 |
|
| 6 |
class Sonogram():
|
| 7 |
|
|
|
|
| 28 |
if not self.isGPU:
|
| 29 |
print(f"GPU is not available")
|
| 30 |
self.device = torch.device("cuda" if self.isGPU else "cpu")
|
| 31 |
+
print(f"Using {self.device} instead.")
|
| 32 |
|
| 33 |
self.pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
|
| 34 |
self.pipeline.to(self.device)
|