import gradio as gr from inference import text_to_speech import logging logger=logging.getLogger("app") logger.setLevel(logging.INFO) with gr.Blocks() as demo: gr.Markdown("""# Text-to-Speech Gustavo Petro Fine-tuned [VITS](https://github.com/statscol/tts-ai-public-figure)""") with gr.Row(): text_input = gr.Textbox(label="Input Text",value="Hola soy Gustavo Petro y esta es mi voz de prueba",lines=1, placeholder="Hola soy Gustavo Petro y esta es mi voz de prueba") text_button = gr.Button("Generate") text_button.click(text_to_speech, inputs=text_input, outputs=gr.Audio(label="Model Response")) logger.info("prompt: ",text_button) demo.launch()