From 424e0b9e55f0d9c698e619a05634ff5cd55e61b5 Mon Sep 17 00:00:00 2001 From: Alex Arvanitidis Date: Tue, 11 Jun 2024 22:47:50 +0300 Subject: [PATCH] docs: update README.md --- README.md | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 932ebfa..e7bb9f3 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,44 @@ -# Jaqpot-Inference +# jaqpotpy-inference -`jaqpot-inference` functions as a server for the [jaqpotpy](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy) code, exposing it as an API. This package builds upon the [jaqpotpy-inference](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy-inference) Docker image (as you can see on the Dockerfile), offering a ready-to-use API server for making predictions. +`jaqpotpy-inference` is a FastAPI application for running models created with [jaqpotpy](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy) and returning predictions. It provides a simple API with documentation generated by Swagger, accessible at the `/docs` endpoint. -## Running the Server Locally +## Features -To launch the server locally, use the following command: +- **FastAPI**: Utilizes the FastAPI framework for high performance and easy API creation. +- **Model Inference**: Runs all models created with Jaqpotpy and returns predictions. +- **API Documentation**: Generates interactive API documentation with Swagger, available at `/docs`. +## Requirements + +- Python 3.7+ +- FastAPI +- Uvicorn + +## Installation + +1. Clone the repository: + ```bash + git clone https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy-inference.git + cd jaqpotpy-inference + ``` +2. Install the required dependencies: + ```bash + pip install -r requirements.txt + ``` + +## Running the server + +To start the FastAPI server, simply run: ```bash -uvicorn main:app --host 0.0.0.0 --port 8002 +python main.py ``` -This command initiates the server on port 8002, making the API accessible for local testing and development. -## Docs/Swagger UI +The server will be available at http://127.0.0.1:8002. + +## API Documentation + +Once the server is running, you can access the API documentation at: +http://127.0.0.1:8002/docs + +This documentation is auto-generated by Swagger and provides an interactive interface for testing the API endpoints. -To see the api docs visit http://localhost:8002/docs