lpw commited on
Commit
2f5bcc8
1 Parent(s): f759571

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -29,14 +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
- pipe = SpeechToSpeechPipeline(f"facebook/{model}")
39
- out_audio = pipe(audio).get_config()["value"]["name"]
40
  return out_audio
41
 
42
  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(