erastorgueva-nv commited on
Commit
4da1d88
·
1 Parent(s): 6a2ecca

add spaces.GPU decorator

Browse files

Signed-off-by: Elena Rastorgueva <[email protected]>

Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import json
3
  import librosa
@@ -69,6 +70,7 @@ def convert_audio(audio_filepath, tmpdir, utt_id):
69
  return out_filename, duration
70
 
71
 
 
72
  def transcribe(audio_filepath, src_lang, tgt_lang, pnc):
73
 
74
  if audio_filepath is None:
 
1
+ import spaces
2
  import gradio as gr
3
  import json
4
  import librosa
 
70
  return out_filename, duration
71
 
72
 
73
+ @spaces.GPU
74
  def transcribe(audio_filepath, src_lang, tgt_lang, pnc):
75
 
76
  if audio_filepath is None:
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  nemo_toolkit[asr] @ git+https://github.com/krishnacpuvvada/NeMo.git@4ea8772b476a433c181e59785b06697d466918ce # using new PEP 508 syntax; commit with long-form inference support
2
- gradio==5.21.0 # latest version at time of writing
 
 
1
  nemo_toolkit[asr] @ git+https://github.com/krishnacpuvvada/NeMo.git@4ea8772b476a433c181e59785b06697d466918ce # using new PEP 508 syntax; commit with long-form inference support
2
+ gradio==5.21.0 # latest version at time of writing
3
+ spaces