chenhaoq87's picture
Upload folder using huggingface_hub
63603f7 verified

FastAPI Application

REST API for Milk Spoilage Classification.

Files

  • app.py - FastAPI application
  • requirements.txt - Python dependencies
  • Dockerfile - Docker configuration for deployment

Local Development

# Install dependencies
pip install -r requirements.txt

# Run the server
python app.py
# or
uvicorn app:app --reload --port 7860

Visit http://localhost:7860/docs for interactive API documentation.

Deployment to Hugging Face Spaces

  1. Create a new Space with Docker SDK
  2. Upload these files (renaming as needed):
    • app.pyapp.py
    • requirements.txtrequirements.txt
    • DockerfileDockerfile
    • ../../model/model.joblibmodel.joblib

See docs/DEPLOYMENT_GUIDE.md for detailed instructions.