Spaces:
Sleeping
Sleeping
| import joblib | |
| import pandas | |
| from sklearn import model_selection | |
| import gradio as gr | |
| def greet(one,two, three, four, five, six, seven, eight): | |
| # load the model from disk | |
| loaded_model = joblib.load('finalized_model.sav') | |
| result = loaded_model.predict([[float(one),float(two), float(three), float(four), float(five), float(six), float(seven), float(eight)]]) | |
| return str(result) | |
| demo = gr.Interface( | |
| fn=greet, | |
| inputs=[ | |
| gr.Textbox(label="one"), | |
| gr.Textbox(label="two"), | |
| gr.Textbox(label="three"), | |
| gr.Textbox(label="four"), | |
| gr.Textbox(label="five"), | |
| gr.Textbox(label="six"), | |
| gr.Textbox(label="seven"), | |
| gr.Textbox(label="eight"), | |
| ], | |
| outputs="text", | |
| ) | |
| demo.launch(debug=True, auth=("atom", "password")) |