dwb2023 commited on
Commit
257845f
·
verified ·
1 Parent(s): 7a06ec6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- # import spaces
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
- # @spaces.GPU
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")