FastAPI Application
REST API for Milk Spoilage Classification.
Files
app.py- FastAPI applicationrequirements.txt- Python dependenciesDockerfile- 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
- Create a new Space with Docker SDK
- Upload these files (renaming as needed):
app.py→app.pyrequirements.txt→requirements.txtDockerfile→Dockerfile../../model/model.joblib→model.joblib
See docs/DEPLOYMENT_GUIDE.md for detailed instructions.