Spaces:
Runtime error
Runtime error
import gradio as gr | |
import pickle | |
with open('svm_model.pickle', 'rb') as f: | |
model = pickle.load(f) | |
def predfunction(income_group, area_req, nature, budget): | |
income_group = float(income_group) | |
area_req = float(area_req) | |
nature = float(nature) | |
budget = float(budget) | |
testing = [income_group, area_req, nature, budget] | |
X_new = np.array([[income_group, area_req, nature, budget]]) | |
prediction = model.predict(X_new) | |
return prediction[0] | |
demo = gr.Interface( | |
fn=predfunction, | |
inputs=["text", "text", "text", "text"], | |
outputs=gr.Textbox(label="Best Suited Location For Shop"), | |
) | |
demo.launch(inline = False) |