change to xgb classifier

This commit is contained in:
heyethereum
2024-08-14 01:01:00 +08:00
parent bd41e02b26
commit 1e081c7e47
5 changed files with 3 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# Copy the model file into the container # 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 the rest of the working directory contents into the container at /app
COPY . . COPY . .

View File

@@ -7,7 +7,7 @@ import pandas as pd
app = FastAPI() app = FastAPI()
# Load the trained model # 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 # Define the input data structure using Pydantic
class InputData(BaseModel): class InputData(BaseModel):

Binary file not shown.

View File

@@ -3,3 +3,4 @@ uvicorn==0.30.5
pandas==2.1.3 pandas==2.1.3
scikit-learn==1.3.2 scikit-learn==1.3.2
joblib==1.4.2 joblib==1.4.2
xgboost==2.1.1

Binary file not shown.