lpw commited on
Commit
f759571
1 Parent(s): 378f9a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -29,12 +29,14 @@ pipe_dict = {}
29
 
30
  # io_dict = {model: gr.Interface.load(f"huggingface/facebook/{model}", api_key=st.secrets["api_key"]) for model in MODEL_LIST}
31
  # pipe_dict = {model: SpeechToSpeechPipeline(f"facebook/{model}") for model in MODEL_LIST}
32
- for model in MODEL_LIST:
33
- print(f"model: {model}")
34
- pipe_dict[model] = SpeechToSpeechPipeline(f"facebook/{model}")
35
 
36
  def inference(audio, model):
37
- out_audio = pipe_dict[model](audio).get_config()["value"]["name"]
 
 
38
  return out_audio
39
 
40
  gr.Interface(
 
29
 
30
  # io_dict = {model: gr.Interface.load(f"huggingface/facebook/{model}", api_key=st.secrets["api_key"]) for model in MODEL_LIST}
31
  # pipe_dict = {model: SpeechToSpeechPipeline(f"facebook/{model}") for model in MODEL_LIST}
32
+ # for model in MODEL_LIST:
33
+ # print(f"model: {model}")
34
+ # pipe_dict[model] = SpeechToSpeechPipeline(f"facebook/{model}")
35
 
36
  def inference(audio, model):
37
+ # out_audio = pipe_dict[model](audio).get_config()["value"]["name"]
38
+ pipe = SpeechToSpeechPipeline(f"facebook/{model}")
39
+ out_audio = pipe(audio).get_config()["value"]["name"]
40
  return out_audio
41
 
42
  gr.Interface(