on1onmangoes commited on
Commit
7104546
1 Parent(s): f1bf51a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,8 +21,8 @@ from transformers.pipelines.audio_utils import ffmpeg_read
21
  HF_TOKEN = "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"
22
  # set up the diarization pipeline
23
  diarization_pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.0", use_auth_token=HF_TOKEN)
24
- if torch.cuda.is_available():
25
- diarization_pipeline.to(torch.device("cuda"))
26
 
27
  def transcribe(audio_path, task="transcribe", group_by_speaker=True, progress=gr.Progress()):
28
  # # run Whisper JAX asynchronously using Gradio client (endpoint)
 
21
  HF_TOKEN = "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"
22
  # set up the diarization pipeline
23
  diarization_pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.0", use_auth_token=HF_TOKEN)
24
+ if torch.cuda.is_available():
25
+ diarization_pipeline.to(torch.device("cuda"))
26
 
27
  def transcribe(audio_path, task="transcribe", group_by_speaker=True, progress=gr.Progress()):
28
  # # run Whisper JAX asynchronously using Gradio client (endpoint)