Spaces:
Runtime error
Runtime error
File size: 636 Bytes
c947d15 d4c76b7 c947d15 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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) |