Spaces:
Runtime error

File size: 707 Bytes
449ad8f
 
 
 
 
 
05b8be5
 
449ad8f
 
 
 
05b8be5
 
449ad8f
 
 
 
 
05b8be5
1770b06
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use a lightweight Python base image
FROM python:3.9-slim-buster

# Set the working directory in the container
WORKDIR /app

# Copy the requirements file into the container (now directly in the root of the build context)
COPY requirements.txt .

# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application code and the trained model into the container (now directly in the root of the build context)
COPY app.py .
COPY tuned_random_forest_model.joblib .

# Expose the port that the Flask app will run on
EXPOSE 5000

# Define the command to run the Flask application using gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:predict_sales_api"]