File size: 376 Bytes
6aed106 9883f98 6aed106 9883f98 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
import gradio as gr
def calcular(x1, x2):
x1 = float(x1)
x2 = float(x2)
return 0.5 * x1 - 0.033 * x2 + 4.33
iface = gr.Interface(
fn=calcular,
inputs=[gr.Textbox(label="x1"), gr.Textbox(label="x2")],
outputs=gr.Textbox(label="Resultado"),
title="Regresion lineal Simple"
)
# Ejecutar interfaz
iface.launch(mcp_server=True)
|