Spaces:
Sleeping
Sleeping
Commit ·
ec6b931
1
Parent(s): eecf8d5
Add application file
Browse files
app.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# archivo mi_app.py
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def euros_a_dolares(euros):
|
| 5 |
+
return f"{float(euros)*1.07:.2f} USD"
|
| 6 |
+
|
| 7 |
+
demo = gr.Interface(
|
| 8 |
+
fn=euros_a_dolares,
|
| 9 |
+
inputs=gr.Number(label="Euros"),
|
| 10 |
+
outputs=gr.Textbox(label="Dólares"),
|
| 11 |
+
title="Conversor rápido",
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
demo.launch() # por defecto lanza en 127.0.0.1:7860
|