Please change the branch to cc
, ml
, or android
to see each path repository!
Member | Student ID | Path |
---|---|---|
Irfan Fadli Nugraha | M008BSY0620 | Machine Learning |
Hana Dewi Shoviyah | M283BSX0521 | Machine Learning |
Enas Erliana Zakiya Yudhana | M008BSX0125 | Machine Learning |
Muhamad Fihris Aldama | C296BSY4031 | Cloud Computing |
Rayya Ruwa’im Nafie | C296BSY3695 | Cloud Computing |
Talitha Bertha Arvyandita | A296BSX2694 | Android Development |
Lutfi Nur Rohmah | A015BSX2004 | Android Development |
This repository contains three scripts for different tasks: sentiment analysis using deep learning, collaborative filtering using cosine similarity, and mood based recommendation using switch case to initiate randomly generated value based on each mood group.
- Python 3.x
- TensorFlow 2.x
- Pandas
- NumPy
- Scikit-Learn
pip install tensorflow pandas numpy scikit-learn
For the sentiment analysis task, download the 'train.csv' file and place it in the same directory as the script.
NLP.py
This script loads the dataset, preprocesses the text data, creates a deep learning model for sentiment analysis, and saves the trained model as 'NLP_model.h5'.
Edit the test_text
variable in the script with your own text and run the script to get sentiment predictions.
- The deep learning model architecture consists of an embedding layer, bidirectional LSTM layer, and several dense layers.
- The model is trained using binary crossentropy loss and the Adam optimizer.
- Python 3.x
- Pandas
- NumPy
- Scikit-Learn
pip install pandas numpy scikit-learn
For the collaborative filtering task, download the 'NEW_Dataset Capstone.xlsx - Rating Data (5).csv' file and place it in the same directory as the script.
python collaborative_filtering.py
This script reads the dataset, computes item similarity using cosine similarity, generates new user ratings, and recommends top items for the new user.
The script saves the item similarity matrix using pickle as 'finalized_model.pkl'.
- Collaborative filtering is implemented using cosine similarity between items based on user ratings.
- The script demonstrates how to recommend items for a new user.
JavaScript-enabled environment (browser, Node.js, etc.)
Get the data from the dataset for mood based and put them inside the list of each variables. Ensure you have access to the dataset containing mood-based drink information.
Open the HTML file containing the script in a browser or execute the script using Node.js.
When prompted, enter your mood (happy, sad, lonely, or bored).
The script will output a suggestion based on your mood.
Python - version 3.8 or above.
git clone -b ml https://github.com/fihrisaldama015/Capstone_CoffeScape.git
cd Capstone_CoffeScape/API_FLASK
Clone the ml
branch & go to the API_FLASK
folder directory
pip install --user tensorflow
pip install --user flask
pip install --user pandas
pip install --user pickle
pip install --user numpy
$ python3 coffeescape.py
the server run on port 5000
Node.js - version 18.18.0 or above.
Link Download Node.js => Click This Link to Download
git clone -b cc https://github.com/fihrisaldama015/Capstone_CoffeScape.git
cd Capstone_CoffeScape
npm install
wait this installation proccess to complete. it takes 3-5 minutes.
copy .env.example
and rename the file to .env
JWT_SECRET_KEY= #secret
DATABASE_URL= #https://$PROJECT_ID.firebaseio.com
ML_API_ENDPOINT= #https://$PROJECT_ID.$REGION.appspot.com or http://$EXTERNAL_IP:$PORT
APP_URL= #https://$PROJECT_ID.web.app or http://$EXTERNAL_IP:$PORT
edit the file and use your own key and url
-
Create your Firestore database at Firestore Page, select project if you haven't.
-
Go to Service Account Page, then select your project (ex: capstone) if you haven't choose project yet.
-
Select one of the service account that have
firebase-adminsdk
in the beginning of the service account name. -
Move to tab
KEYS
, clickADD KEY
then selectCreate New Key
-
for key type select
JSON
, then clickCREATE
, the JSON file is downloaded to your local computer -
Go to the downloaded JSON file directory, copy or move the file to the previous
Capstone_CoffeeScape
folder
$ npm run dev
you should see like this when the server run successfully
> capstone@1.0.0 dev
> nodemon src/server.js
[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node src/server.js`
Server running on port 9000