Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastApiProject

A lightweight FastAPI server, configured via YAML, for serving machine learning models built with PyTorch.

Given the dependencies in requirements.txt (FastAPI, Uvicorn, PyYAML, PyTorch, NumPy), this project exposes a FastAPI-based HTTP API that serves predictions from one or more PyTorch models stored under ml_models/.

Requirements

  • Python 3.9+ (recommended)
  • Dependencies listed in requirements.txt

Installation

  1. Clone the repository:

    git clone https://github.com/umeshnandargi/FastApiProject.git
    cd FastApiProject
  2. Create and activate a virtual environment (recommended):

    python -m venv venv
    source venv/bin/activate   # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

Configuration

Server settings are defined in config/server_config.yaml. This file is loaded automatically at startup and passed to ApiServer. Update it with your desired host, port, and any model-related settings before running the server.

Running the Server

python main.py

This loads the configuration and starts the API server. Once running, if it's a standard FastAPI setup, interactive API docs should be available at:

  • Swagger UI: http://localhost:<port>/docs
  • ReDoc: http://localhost:<port>/redoc

(Replace <port> with the value configured in server_config.yaml.)

Contributing

Contributions are welcome. Please open an issue or submit a pull request with a clear description of your changes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages