philschmid HF staff commited on
Commit
e47b402
1 Parent(s): f012ac7

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +6 -0
handler.py CHANGED
@@ -1,4 +1,10 @@
1
  from typing import Dict
 
 
 
 
 
 
2
  from pyannote.audio import Pipeline
3
  from transformers.pipelines.audio_utils import ffmpeg_read
4
  import torch
 
1
  from typing import Dict
2
+ from subprocess import run
3
+
4
+ # install pyannote on the fly since it is incompatible with huggingface_hub > 0.9
5
+ run("pip install torchaudio==0.11.0", shell=True, check=True)
6
+ run("pip install pyannote.audio==2.0.1", shell=True, check=True)
7
+
8
  from pyannote.audio import Pipeline
9
  from transformers.pipelines.audio_utils import ffmpeg_read
10
  import torch