FROM python:3.10 # Set the working directory WORKDIR /code # Copy the requirements file and install dependencies COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # Copy the rest of the application COPY . . # Expose port 7860 which is the default for Hugging Face Spaces EXPOSE 7860 # Run the FastAPI application on port 7860 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]