Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,12 +17,12 @@ expected_inputs = ["sepal_length", "sepal_width", "petal_length", "petal_width"]
|
|
17 |
|
18 |
# ----- Helper Functions
|
19 |
# Function to load ML toolkit
|
20 |
-
def load_ml_toolkit(file_path= r"
|
21 |
"""
|
22 |
This function loads the ML items into this file. It takes the path to the ML items to load it.
|
23 |
|
24 |
Args:
|
25 |
-
file_path (regexp, optional): It receives the file path to the ML items, but defaults to the "src" folder in the repository. The full default relative path is r"
|
26 |
|
27 |
Returns:
|
28 |
file: It returns the pickle file (which in this case contains the Machine Learning items.)
|
@@ -39,7 +39,7 @@ scaler = loaded_toolkit["scaler"]
|
|
39 |
|
40 |
# Import the model
|
41 |
model = XGBClassifier()
|
42 |
-
model.load_model(r"
|
43 |
|
44 |
|
45 |
# Function to process inputs and return prediction
|
|
|
17 |
|
18 |
# ----- Helper Functions
|
19 |
# Function to load ML toolkit
|
20 |
+
def load_ml_toolkit(file_path= r"Iris_App_toolkit"):
|
21 |
"""
|
22 |
This function loads the ML items into this file. It takes the path to the ML items to load it.
|
23 |
|
24 |
Args:
|
25 |
+
file_path (regexp, optional): It receives the file path to the ML items, but defaults to the "src" folder in the repository. The full default relative path is r"Iris_App_toolkit".
|
26 |
|
27 |
Returns:
|
28 |
file: It returns the pickle file (which in this case contains the Machine Learning items.)
|
|
|
39 |
|
40 |
# Import the model
|
41 |
model = XGBClassifier()
|
42 |
+
model.load_model(r"xgb_model.json")
|
43 |
|
44 |
|
45 |
# Function to process inputs and return prediction
|