setfunctionenvironment commited on
Commit
f2a66f5
Β·
verified Β·
1 Parent(s): 7a99d5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -1,4 +1,3 @@
1
- import spaces
2
  from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
3
  import torch
4
  import soundfile as sf
@@ -52,7 +51,6 @@ def extract_speech_ids(speech_tokens_str):
52
  print(f"Unexpected token: {token_str}")
53
  return speech_ids
54
 
55
- @spaces.GPU(duration=60)
56
  def infer(sample_audio_path, target_text, progress=gr.Progress()):
57
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
58
  progress(0, 'Loading and trimming audio...')
 
 
1
  from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
2
  import torch
3
  import soundfile as sf
 
51
  print(f"Unexpected token: {token_str}")
52
  return speech_ids
53
 
 
54
  def infer(sample_audio_path, target_text, progress=gr.Progress()):
55
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
56
  progress(0, 'Loading and trimming audio...')