File size: 497 Bytes
ac39179
7f9926c
5c7d7f4
7f9926c
 
ac39179
7f9926c
 
ac39179
7f9926c
 
ac39179
7f9926c
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"]