Skip to content

AI Decision-Making Model for classifying text-based inputs into Yes, No, or Maybe using Machine Learning (ML) and Natural Language Processing (NLP) with Flask API for easy integration

Notifications You must be signed in to change notification settings

3n881/ai-decision-making

Repository files navigation

AI Decision-Making Model

The AI Decision-Making Model is a machine learning-based solution designed to classify text input (such as questions or queries) into one of three categories: Yes, No, or Maybe. Built using Python, Scikit-learn, and Flask, this model leverages the Multinomial Naive Bayes algorithm to process natural language data. It is packaged as a simple REST API for easy integration into other applications.

Whether you're building an automated assistant, recommendation system, or decision-support tool, this model can be customized and extended to meet your needs. It is lightweight, easy to use, and deployable to platforms like Heroku.

Authors

Installation

To install this project run

Step 1: Clone the Repository

git clone https://github.com/your-username/ai-decision-making.git
cd ai-decision-making

Step 2: Create a Virtual Environment

On Windows:

python -m venv venv
venv\Scripts\activate

On macOS/Linux:

python3 -m venv venv
source venv/bin/activate

Step 3: Install Dependencies

pip install -r requirements.txt

Usage

Step 1: Train the Model

python train_model.py

Step 2: Run the Flask Application

python app.py

App will run at http://127.0.0.1:5000/

API Usage

Test the API Example Request (cURL):

curl -X POST http://127.0.0.1:5000/predict -H "Content-Type: application/json" -d '{"input": "Should I buy a new phone?"}'

Example Response:

{
  "decision": "Maybe"
}

Deployment

Deploy on Heroku Login to Heroku:

heroku login

Create a New App:

heroku create your-app-name

Deploy the App:

git push heroku master

Open the App:

heroku open

About

AI Decision-Making Model for classifying text-based inputs into Yes, No, or Maybe using Machine Learning (ML) and Natural Language Processing (NLP) with Flask API for easy integration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published