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.
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
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/
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"
}
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