| import gradio as gr |
|
|
| def test_function(text): |
| """Función de prueba simple""" |
| return f"✅ Funciona! Recibido: {text}" |
|
|
| |
| with gr.Blocks(title="Test App") as demo: |
| gr.HTML("<h1>🧪 Test de Funcionamiento</h1>") |
|
|
| with gr.Row(): |
| input_text = gr.Textbox(label="Texto de prueba", placeholder="Escribe algo...") |
| output_text = gr.Textbox(label="Resultado", interactive=False) |
|
|
| btn = gr.Button("Probar", variant="primary") |
| btn.click(fn=test_function, inputs=[input_text], outputs=[output_text]) |
|
|
| if __name__ == "__main__": |
| demo.launch() |