diff --git a/app/dockerfile b/app/dockerfile index b2cb5c6..f6390f6 100644 --- a/app/dockerfile +++ b/app/dockerfile @@ -11,7 +11,7 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the model file into the container -COPY random_forest_model.pkl /app/ +COPY randomized_search_xgb_model-2.pkl /app/ # Copy the rest of the working directory contents into the container at /app COPY . . diff --git a/app/main.py b/app/main.py index 90b0d0a..be74a1d 100644 --- a/app/main.py +++ b/app/main.py @@ -7,7 +7,7 @@ import pandas as pd app = FastAPI() # Load the trained model -model = joblib.load('random_forest_model.pkl') +model = joblib.load('randomized_search_xgb_model-2.pkl') # Define the input data structure using Pydantic class InputData(BaseModel): diff --git a/app/randomized_search_xgb_model-2.pkl b/app/randomized_search_xgb_model-2.pkl new file mode 100644 index 0000000..a8e0792 Binary files /dev/null and b/app/randomized_search_xgb_model-2.pkl differ diff --git a/app/requirements.txt b/app/requirements.txt index 5657ffd..7fe949b 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -3,3 +3,4 @@ uvicorn==0.30.5 pandas==2.1.3 scikit-learn==1.3.2 joblib==1.4.2 +xgboost==2.1.1 \ No newline at end of file diff --git a/app/xgb_classifier_model.pkl b/app/xgb_classifier_model.pkl new file mode 100644 index 0000000..b243024 Binary files /dev/null and b/app/xgb_classifier_model.pkl differ