Skip to content

herossa/skipthedishes_vanhackthon_fair2.0

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VANHACKTHON Fair 2.0

Sentiment Analysis Amazon Fine Food Reviews

We've got a dataset from Kaggle and based on the customer review text we've build a model to predict sentiment (positive, negative) about the product.

Install

This project requires Python >= 3.5 and the following Python libraries installed:

pip install -r requirements.txt

  • You have to install and run docker

Download the dataset

download.zip and extract Reviews.csv for the project directory.

About the data

We've got the texts reviews (Text column) and used TF-IDF transformation to extract features and the Score columns as the target. You can see the code to build the model in this Jupyter Notebook.

API

We developed a RESTFUL API using Flask to expose this model.

API parameters

   ```
   Request
   Content-Type = "application/json"
   {"text_review": "your review about the project here"}
   
   Response
   {"sentiment": "Positive"}
   {"sentiment": "Negative"}
   ```

How to Run

1 - Run all steps in Jupyet Notebook to generate the model

2 - $python3 build_docker.py

3 - docker run -p 805:805 vanhackthon

4 - After you can use curl to post some review and get the response.

```
curl -X POST http://localhost:805  -H 'Content-Type: application/json' -d '{"text_review": "Your review here"}'
```

Authors

Fábio Eduardo dos Reis

Heros da Silva Araujo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.9%
  • Python 3.1%