Skip to content

07. Deployment and Technical Implementation

kahsuann edited this page Nov 15, 2024 · 8 revisions

Instructions for running the Docker container

  1. Clone the Repository.

git clone "https://github.com/nltyh/DSA3101-Project.git"

  1. Ensure that the folder follows the same structure below:
.
├── customer_behaviour (Subgroup Q1)
│   ├── templates
│   │   └── index.html
│   ├── Customer Retention Analysis.ipynb
│   ├── CustomerPrep.ipynb
│   ├── Messages Table Schema.md
│   ├── QA1 EDA.ipynb
│   ├── QA1b.ipynb
│   ├── QA1bv2.ipynb
│   ├── Readme.md
│   ├── SyntheticAB.ipynb
│   ├── campaigns_clean.py
│   ├── clean_filtered_messages.py
│   ├── create_messages_database.py
│   ├── customer_segmentation_model.py
│   ├── initial_explore_customer_profile.py
│   ├── messages2.py
│   ├── messages_filter.py
│   ├── app.py
│   └── requirements.txt   
├── inventory_management (Subgroup Q2)
│   ├── Analyzing PED.ipynb
│   ├── Dynamic Pricing Model.ipynb
│   ├── Demand Forecasting and Inventory Algorithm
│   ├── Demand_Forecasting_Model.ipynb
│   ├── PricingModel.pkl
│   ├── Generating Products, Orders, Suppliers Table.ipynb
│   ├── Products EDA.ipynb
│   └── Supply_Chain.ipynb
├── Customer_Review_Analysis (Bonus Questions)
│   ├── NLP_Customer_reviews.ipynb
│   ├── Intelligent_Customer_Review_Analysis.py
│   └── Customer_Reviews.py
├── Dockerfile
├── README.md
└── docker-compose.yml
  1. Install Docker and ensure that Docker is running.

  2. Run the following command in the root directory:

docker-compose up --build

  1. Go to http://localhost:8080 and you should see our web app with our models and insights.
  • First section contains the results from our Customer Segmentation Model, which uses a Human Knowledge-Based Model to segment customers based on their actions and spending habits.

  • Second section contains the results from our Demand Forecasting Model.

  • The last section displays our results from using Natural Language Processing to analyse customer reviews, as well as using a Large Language Model to extract key insights regarding customer satisfaction, product features and quality.

Monitoring and maintenance considerations

  • Ensure that your version of python is at least 3.9 or above.

  • Ensure that port 8080 is not being used. If it is, either kill any existing servers via terminal, or change 8080 in docker-compose.yaml file to any existing empty port.

  • If you get this error message: failed to solve: python:3.9-slim: failed to resolve source metadata for docker.io/library/python:3.9-slim: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH, out: , run docker pull python:3.9-slim on your terminal, then run docker-compose up --build again.

Clone this wiki locally