Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
1cedc8d
1
Parent(s):
4a5aaa8
attempt to fix GPU runtime error
Browse files- app.py +2 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from gryannote_audio import AudioLabeling
|
3 |
from gryannote_rttm import RTTM
|
4 |
from pyannote.audio import Pipeline
|
5 |
import os
|
6 |
|
|
|
7 |
def apply_pipeline(audio):
|
8 |
"""Apply specified pipeline on the indicated audio file"""
|
9 |
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1", use_auth_token=os.environ["HF_TOKEN"])
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
from gryannote_audio import AudioLabeling
|
4 |
from gryannote_rttm import RTTM
|
5 |
from pyannote.audio import Pipeline
|
6 |
import os
|
7 |
|
8 |
+
@spaces.GPU(duration=300)
|
9 |
def apply_pipeline(audio):
|
10 |
"""Apply specified pipeline on the indicated audio file"""
|
11 |
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1", use_auth_token=os.environ["HF_TOKEN"])
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
-
pyannote-audio
|
2 |
gradio==4.27.0
|
3 |
gryannote
|
|
|
|
|
|
|
|
1 |
gradio==4.27.0
|
2 |
gryannote
|
3 |
+
pyannote-audio==3.3.2
|
4 |
+
spaced==0.30.2
|