Spaces:
Running
Running
Commit ·
43e6f31
1
Parent(s): f8eb3e4
🛠️ Update app.py - fix logic gọi API mới
Browse files
app.py
CHANGED
|
@@ -98,7 +98,12 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 98 |
interactive=False
|
| 99 |
)
|
| 100 |
|
| 101 |
-
btn_synthesize.click(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
# Run Gradio with share=True to get a gradio.live link
|
| 104 |
demo.queue().launch(share=True)
|
|
|
|
| 98 |
interactive=False
|
| 99 |
)
|
| 100 |
|
| 101 |
+
btn_synthesize.click(
|
| 102 |
+
fn=infer_tts,
|
| 103 |
+
inputs=[ref_audio, gen_text, speed],
|
| 104 |
+
outputs=[output_audio, output_spectrogram],
|
| 105 |
+
api_name="infer_tts" # ✅ Đây là thứ tạo ra endpoint API bạn đang gọi
|
| 106 |
+
)
|
| 107 |
|
| 108 |
# Run Gradio with share=True to get a gradio.live link
|
| 109 |
demo.queue().launch(share=True)
|