Giter VIP home page Giter VIP logo

linear-predict's Introduction

Linear Regression Model Predictor

This project is a simple yet powerful implementation of a linear regression model served through a FastAPI application. It's designed to predict outcomes based on a pre-trained TensorFlow model. The API is intuitive and documented, making it accessible for developers and machine learning enthusiasts.

Features

  • FastAPI Framework: Utilizes FastAPI for efficient and easy-to-use API endpoints.
  • TensorFlow Integration: Leverages a TensorFlow model for making predictions.
  • Auto-Generated Documentation: Includes Swagger UI documentation generated automatically by FastAPI.

Getting Started

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python 3.8 or above
  • pip for package installation

Installation

  1. Clone the repository to your local machine:
    git clone https://github.com/hiroyukikumazawa/linear-predict.git
  2. Navigate to the project directory:
    cd linear-predict
  3. Install the required packages:
    pip install -r requirements.txt

Usage

To start the FastAPI server, run the following command:

uvicorn app:app --reload

This command will start the development server with live reloading. The API documentation will be available at http://127.0.0.1:8000/docs.

Making Predictions

To make predictions, use the /predict/ endpoint. You can do this through the Swagger UI or by sending a POST request with a JSON body containing the values for prediction:

{
  "values": [0.1, 0.5, 0.9]
}

Training the Model

If you wish to retrain the model with your data, run:

python ./train/train.py

This script generates synthetic training data, trains the linear regression model, and saves it for the application to use.

Contributing

We welcome contributions! If you have suggestions for improvements or bug fixes, please open an issue or submit a pull request.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Hiroyuki Kumazawa - [email protected]

Project Link: https://github.com/hiroyukikumazawa/linear-predict

Acknowledgements

linear-predict's People

Contributors

hiroyukikumazawa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.