proyectogradio / app.py
amandaodoo's picture
decorador
1824b31
Raw History Blame Contribute Delete
382 Bytes
import gradio as gr
import spaces
@spaces.GPU
def saludar(nombre):
if not nombre.strip():
return "Hola!"
return f"Hola, {nombre}!"
demo = gr.Interface(
fn=saludar,
inputs=gr.Textbox(label="Nombre", placeholder="Escribe tu nombre"),
outputs=gr.Textbox(label="Saludo"),
title="App minima de Gradio",
)
if __name__ == "__main__":
demo.launch()