Spaces:
Sleeping
Sleeping
FROM python:3.13-slim | |
WORKDIR /app | |
# Copy requirements file | |
COPY requirements.txt . | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Download NLTK data | |
RUN python -c "import nltk; nltk.download('punkt'); nltk.download('wordnet'); nltk.download('stopwords')" | |
# Create necessary directories | |
RUN mkdir -p data/users data/sessions data/conversations data/feedback | |
# Copy only the necessary files | |
COPY api_mental_health.py . | |
COPY .env.example .env | |
COPY create_vector_db.py . | |
COPY mental_health_model_artifacts/ mental_health_model_artifacts/ | |
# Expose the port Hugging Face Spaces expects | |
EXPOSE 7860 | |
# Command to run the application | |
CMD ["uvicorn", "api_mental_health:app", "--host", "0.0.0.0", "--port", "7860"] |