A simple FastAPI web application that provides mock prediction API endpoint.
- Exposes a '/predict' endpoint that accepts POST asyncronous and syncronous requests
- Exposes '/predict/{prediction_id}' endpoint that fetches GET requests for predictions already done
- Simulates ML model inferences -Returns prediction results
# Build the Docker image
docker build -t sych .
# Run the container
docker run -p 8080:8080 sych# Install dependencies
pip install -r requirements.txt
# Run the app
uvicorn app:app --host 0.0.0.0 --port 8080curl -i -X POST "http://localhost:8080/predict" \
-H "Content-Type: application/json" \
-d '{"input": "<test input>"}'app.py # Main FastAPI application requirements.txt # Python dependencies Dockerfile # Docker config file README.md # Instructions to run
- Python 3.8+
- FastAPI
- Uvicorn