KwameOO commited on
Commit
b23ac7e
1 Parent(s): a55f37d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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"src\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"src\Iris_App_toolkit".
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"src\xgb_model.json")
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