import gradio as gr import pickle import pandas as pd import sklearn def predict(x1,x2): new_data = pd.DataFrame({'Floor space of the shop':[x1], 'Distance to the nearest station':[x2]} ) # Load the trained model with open('modelo_regresion.pkl', 'rb') as f: model = pickle.load(f) y_pred = model.predict(new_data) return y_pred[0] if __name__ == "__main__": demo = gr.Interface(fn=predict, inputs=["number","number"], outputs="number") demo.launch()