Spaces:
Runtime error
Runtime error
import gradio as gr | |
import pandas as pd | |
import numpy as np | |
import pickle | |
remote_df = pd.read_excel('test_df.xlsx') | |
def predict(x1, x2): | |
X = np.array([x1, x2], ndmin = 2) | |
with open('test_model.pkl', 'rb') as model: | |
clf = pickle.load(model) | |
y_pred = clf.predict(X) | |
return y_pred + remote_df['col1'][0] | |
demo = gr.Interface( | |
predict, | |
inputs = [gr.Number(), gr.Number()], | |
outputs = gr.Number(), | |
examples=[ | |
], | |
title = 'Deploy Test' | |
) | |
demo.launch(share = True) | |