Update tts/gradio_api.py
Browse files- tts/gradio_api.py +2 -3
tts/gradio_api.py
CHANGED
|
@@ -62,7 +62,7 @@ def model_worker(input_queue, output_queue, device_id):
|
|
| 62 |
raise gr.Error("Generation failed")
|
| 63 |
|
| 64 |
|
| 65 |
-
def main(inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w, processes
|
| 66 |
input_queue = mp_manager.Queue()
|
| 67 |
print("Push task to the inp queue |", inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w)
|
| 68 |
input_queue.put((inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w))
|
|
@@ -87,8 +87,7 @@ if __name__ == '__main__':
|
|
| 87 |
processes = []
|
| 88 |
|
| 89 |
api_interface = gr.Interface(fn=
|
| 90 |
-
partial(main, processes=processes,
|
| 91 |
-
output_queue=output_queue),
|
| 92 |
inputs=[gr.Audio(type="filepath", label="Upload .wav"), gr.File(type="filepath", label="Upload .npy"), "text",
|
| 93 |
gr.Number(label="infer timestep", value=32),
|
| 94 |
gr.Number(label="Intelligibility Weight", value=1.4),
|
|
|
|
| 62 |
raise gr.Error("Generation failed")
|
| 63 |
|
| 64 |
|
| 65 |
+
def main(inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w, processes):
|
| 66 |
input_queue = mp_manager.Queue()
|
| 67 |
print("Push task to the inp queue |", inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w)
|
| 68 |
input_queue.put((inp_audio, inp_npy, inp_text, infer_timestep, p_w, t_w))
|
|
|
|
| 87 |
processes = []
|
| 88 |
|
| 89 |
api_interface = gr.Interface(fn=
|
| 90 |
+
partial(main, processes=processes),
|
|
|
|
| 91 |
inputs=[gr.Audio(type="filepath", label="Upload .wav"), gr.File(type="filepath", label="Upload .npy"), "text",
|
| 92 |
gr.Number(label="infer timestep", value=32),
|
| 93 |
gr.Number(label="Intelligibility Weight", value=1.4),
|