Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ from transformers import (
|
|
19 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
20 |
|
21 |
import torch # If you're using PyTorch
|
22 |
-
|
23 |
|
24 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
25 |
|
@@ -87,7 +87,7 @@ def download_yt_audio(yt_url, filename):
|
|
87 |
ydl.download([yt_url])
|
88 |
|
89 |
|
90 |
-
|
91 |
def yt_transcribe(yt_url, task):
|
92 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
93 |
filepath = os.path.join(tmpdirname, "video.mp4")
|
|
|
19 |
from transformers.pipelines.audio_utils import ffmpeg_read
|
20 |
|
21 |
import torch # If you're using PyTorch
|
22 |
+
import spaces
|
23 |
|
24 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
25 |
|
|
|
87 |
ydl.download([yt_url])
|
88 |
|
89 |
|
90 |
+
@spaces.GPU(duration=120)
|
91 |
def yt_transcribe(yt_url, task):
|
92 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
93 |
filepath = os.path.join(tmpdirname, "video.mp4")
|