sanchit-gandhi HF staff commited on
Commit
5d52c32
1 Parent(s): 5290d3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import torch
2
 
3
  import gradio as gr
@@ -23,6 +24,7 @@ pipe = pipeline(
23
  )
24
 
25
 
 
26
  def transcribe(inputs, task):
27
  if inputs is None:
28
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
@@ -70,7 +72,7 @@ def download_yt_audio(yt_url, filename):
70
  except youtube_dl.utils.ExtractorError as err:
71
  raise gr.Error(str(err))
72
 
73
-
74
  def yt_transcribe(yt_url, task, max_filesize=75.0):
75
  html_embed_str = _return_yt_html_embed(yt_url)
76
 
 
1
+ import spaces
2
  import torch
3
 
4
  import gradio as gr
 
24
  )
25
 
26
 
27
+ @spaces.GPU
28
  def transcribe(inputs, task):
29
  if inputs is None:
30
  raise gr.Error("No audio file submitted! Please upload or record an audio file before submitting your request.")
 
72
  except youtube_dl.utils.ExtractorError as err:
73
  raise gr.Error(str(err))
74
 
75
+ @spaces.GPU
76
  def yt_transcribe(yt_url, task, max_filesize=75.0):
77
  html_embed_str = _return_yt_html_embed(yt_url)
78