FROM python:3.10-slim WORKDIR /app # Copy all files (app.py, model.py, model.pt, requirements.txt) COPY . . # Install dependencies RUN pip install --no-cache-dir torch streamlit # Hugging Face Spaces port EXPOSE 7860 # THE FIX: Add headless, enableCORS=false, and gatherUsageStats=false CMD ["streamlit", "run", "app.py", \ "--server.port=7860", \ "--server.address=0.0.0.0", \ "--server.headless=true", \ "--server.enableCORS=false", \ "--browser.gatherUsageStats=false"]