# Use the official Python image FROM python:3.9 # Set the working directory WORKDIR /code # Copy the requirements and the main script # (We install dependencies directly to keep it simple) RUN pip install fastapi uvicorn pydantic # Copy your main.py into the container COPY ./main.py /code/main.py # Hugging Face Spaces uses port 7860 by default CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]