priceme / app.py
jaimebellver's picture
Add application file
ec6b931
raw
history blame contribute delete
358 Bytes
# archivo mi_app.py
import gradio as gr
def euros_a_dolares(euros):
return f"{float(euros)*1.07:.2f} USD"
demo = gr.Interface(
fn=euros_a_dolares,
inputs=gr.Number(label="Euros"),
outputs=gr.Textbox(label="Dólares"),
title="Conversor rápido",
)
if __name__ == "__main__":
demo.launch() # por defecto lanza en 127.0.0.1:7860