The Cohere Commerce Machine Learning Recommendation Model is an innovative addition to Cohere Commerce's’ existing e-commerce platform. This addition designed to streamline the purchasing process while providing a personalized shopping experience for customers. Leveraging cutting-edge AI and machine learning technology, this application delivers targeted, tailored product recommendations. With a focus on scalability and performance, this platform aims to offer an intuitive user interface and a secure environment for customers.
Below is the current UI that houses the machine learning recommendation API:
- The reccomendations are at the bottom of the page and correspond to brand ID's which are present in our dataset
Searching for the API's first reccomendation returns highly relevant and accurate results, offering strong suggestions that align well with the user's preferences as shown below:
Below is the pipeline for cleaning and processing review data, performing sentiment analysis, prioritizing user-defined rating categories, and using SVD-based matrix factorization to recommend top brands.
- Clone the repository to your local machine
- Install pipenv by using command:
pip install pipenv - Install the dependencies by using command:
pipenv install
- Activate the virtual environment by using command: pipenv shell
- In the terminal, type these commands:
pythonimport fastapiexit()
- Run the application by using command:
uvicorn api.main:app --reload - Open your web browser and navigate to
http://127.0.0.1:8000(or link show on terminal) - Optional: You can use the Swagger UI to interact with the API by navigating to
http://127.0.0.1:8000/docsin your web browser. - To end the process, click on the terminal then
Ctrl + C - To deactivate the virtual environment, in terminal type:
exit
-
Visit the
http://127.0.0.1:8000/docsafter step 3 above -
Choose the GET route that has /recommend
-
Click
Try it out -
Look at the Response body, that is our top 5 recommended brand id
If you need to install any other packages. Follow these steps
- Deactivate virtual env
- Use command:
pipenv install <package-name> - Activate virtual env
- Import those package if needed by following step 2 in the "Running the Application" part.
Note: If you want to install dev-package, the use this command: pipenv install --dev <package-name>