Skip to content

hiteshK03/Product-review-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Product-review-classifier-CS772-DL4NLP

Rate product reviews from 1 to 5

Steps to run the program:

Initial Setup:

  1. Install virtual env if not present already using `sudo apt install python3-venv`
  2. Create a virutal environment using `python3.6 -m venv nlp772`
  3. Source the created virtualenv using `source nlp772/bin/activate`
  4. Install all the required packages using pip: `pip install -r requirements.txt`
  5. Install pytorch and torchtext with `pip install --pre torch torchtext -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html`
  6. Download spcy model using `python -m spacy download en_core_web_sm`
  7. Download embeddings from http://nlp.stanford.edu/data/glove.840B.300d.zip

Running the code:

NeuralNet

For training, one can run the colab file

RNN

Running the auto.py file will popup a UI and user can use/change the parameters as they wish

Transformers with Lime Explainability

Running kivy_main.py will start a GUI in which user can input sentences for review ratings

For training, one can run the colab file or python sequence_classifiction.py

Lime example

lime_analysis_plot

Releases

No releases published

Packages

No packages published