Aryan Gosaliya commited on
Commit
8b33e3f
·
1 Parent(s): bfeeab9

added pyannote

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -0
  2. app/services/asr.py +2 -2
Dockerfile CHANGED
@@ -56,6 +56,7 @@ ENV PYTHONUNBUFFERED=1
56
  ENV HOST=0.0.0.0
57
  ENV PORT=7860
58
  ENV HF_HOME=/.cache
 
59
 
60
  # Expose the port for Hugging Face Spaces
61
  EXPOSE 7860
 
56
  ENV HOST=0.0.0.0
57
  ENV PORT=7860
58
  ENV HF_HOME=/.cache
59
+ ENV MPLCONFIGDIR=/app/.config/matplotlib
60
 
61
  # Expose the port for Hugging Face Spaces
62
  EXPOSE 7860
app/services/asr.py CHANGED
@@ -19,7 +19,7 @@ except Exception as e:
19
  if HF_TOKEN:
20
  try:
21
  diarization_pipeline = Pipeline.from_pretrained(
22
- "pyannote/speaker-diarization-3.1", use_auth_token=HF_TOKEN
23
  )
24
  # Move pipeline to CPU if no GPU is available
25
  if not torch.cuda.is_available():
@@ -28,7 +28,7 @@ if HF_TOKEN:
28
  print(f"Error loading pyannote pipeline: {e}")
29
  diarization_pipeline = None
30
  else:
31
- print("HUGGING_FACE_TOKEN not set, skipping diarization.")
32
  diarization_pipeline = None
33
 
34
 
 
19
  if HF_TOKEN:
20
  try:
21
  diarization_pipeline = Pipeline.from_pretrained(
22
+ "pyannote/speaker-diarization-3.1", token=HF_TOKEN
23
  )
24
  # Move pipeline to CPU if no GPU is available
25
  if not torch.cuda.is_available():
 
28
  print(f"Error loading pyannote pipeline: {e}")
29
  diarization_pipeline = None
30
  else:
31
+ print("HF_TOKEN not set, skipping diarization.")
32
  diarization_pipeline = None
33
 
34