# Utiliser une image Python légère FROM python:3.9 # Définir le répertoire de travail WORKDIR /app # Copier les fichiers nécessaires COPY requirements.txt . COPY app.py . # Installer les dépendances RUN pip install --no-cache-dir -r requirements.txt # Exposer le port correct pour Hugging Face Spaces EXPOSE 7860 # Lancer l'application FastAPI avec Uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]