Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Assessment App

A simple FastAPI web application that provides mock prediction API endpoint.

What it does

  • 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

Quick Start

Using Docker (Recommended)

# Build the Docker image
docker build -t sych .

# Run the container
docker run -p 8080:8080 sych

Using Python directly

# Install dependencies
pip install -r requirements.txt

# Run the app
uvicorn app:app --host 0.0.0.0 --port 8080

Example Request

curl -i -X POST "http://localhost:8080/predict" \
     -H "Content-Type: application/json" \
     -d '{"input": "<test input>"}'

Project Structure

app.py # Main FastAPI application requirements.txt # Python dependencies Dockerfile # Docker config file README.md # Instructions to run

Requirements

  • Python 3.8+
  • FastAPI
  • Uvicorn

About

A simple FastAPI web application that provides mock prediction API endpoint.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages