Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
def inference(audio, model):
|
37 |
-
|
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(
|