Neurify commited on
Commit
d71181c
1 Parent(s): 9ba2a1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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.")
@@ -71,6 +73,7 @@ def download_yt_audio(yt_url, filename):
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(duration=120)
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.")
 
73
  raise gr.Error(str(err))
74
 
75
 
76
+ @spaces.GPU(duration=120)
77
  def yt_transcribe(yt_url, task, max_filesize=75.0):
78
  html_embed_str = _return_yt_html_embed(yt_url)
79