Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,12 @@ from pyannote.audio import Pipeline as DiarizationPipeline
|
|
| 8 |
|
| 9 |
# Initialisation des modèles
|
| 10 |
whisper_model = WhisperModel("large-v2", device="cpu", compute_type="int8")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
diari_pipeline = DiarizationPipeline.from_pretrained(
|
| 12 |
"pyannote/speaker-diarization-3.1",
|
| 13 |
use_auth_token="hf_YOUR_TOKEN_HERE" # Remplace par ton token Hugging Face perso
|
|
|
|
| 8 |
|
| 9 |
# Initialisation des modèles
|
| 10 |
whisper_model = WhisperModel("large-v2", device="cpu", compute_type="int8")
|
| 11 |
+
token = os.getenv("HF_TOKEN") # Ajoute cette variable dans les secrets de ton Space si besoin
|
| 12 |
+
pipeline = Pipeline.from_pretrained(
|
| 13 |
+
"pyannote/speaker-diarization-3.1",
|
| 14 |
+
use_auth_token=token
|
| 15 |
+
)
|
| 16 |
+
|
| 17 |
diari_pipeline = DiarizationPipeline.from_pretrained(
|
| 18 |
"pyannote/speaker-diarization-3.1",
|
| 19 |
use_auth_token="hf_YOUR_TOKEN_HERE" # Remplace par ton token Hugging Face perso
|