Coder Social home page Coder Social logo

cuongpiger / scl_khvw_sentiment_analysis_project Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 893.4 MB

Sentiment Analysis Model for customers' comments - Shopee Fashion Products

Jupyter Notebook 60.67% Python 1.37% HTML 37.92% JavaScript 0.02% CSS 0.02% Dockerfile 0.01%
ajax data-crawling data-mining django javascript machine-learning sklearn tensorflow

scl_khvw_sentiment_analysis_project's Introduction

1. Description

  • Hello guys, this is my small application used to predict comments are positive or negative.
  • I used selenium to crawl the entire data from Shopee Vietnam with over than 23.000 records. Each record consists mainly of the client's comment and his number of stars for the his comment.
  • After training phase and several model evaluation techniques, the model was embedded into web using Django framework.
  • The main field that my app concentrate on is fashion. So if you try to force the model predict on a wrong data (such as technology comments, food comments,...), The possibility is that the model can not predict accurately.
  • So, if you are interested in my application, you can read more the documents inside the directory Docs. I write with such a clarity and precision for what techniques I used.

2. Installation

2.1. Option 1: Naive way

  • Firstly, you need to create a new conda environment using python 3.8.10 and then activate the new environment which you have just created.
    conda create --name sentiment python==3.8.10 pip
    conda activate sentiment
  • OK, open your terminal at the same level with file requirements.txt to install some python packages.
    pip install -r requirements.txt
  • And then, change your directory to web directory.
    cd web
    and now, you are standing at path .../SCL_KHVW_Sentiment_Analysis_Project/web/
  • Finally, you can run the Django application by the followed command.
    python manage.py runserver
    Because this application uses TensorFlow, SkLearn and some other heavy packages. So for the first time you run this app, it will take several seconds to load model and initialize some configuration, after that moment, the app can work smoothly.
  • OK, open your favorite browser and go to url http://localhost:8000, the super gorgeous interface of my app will appear like this ๐Ÿ˜… (sorry front-end developers).

2.2. Option 2: Docker way

  • Run the followed command to run the application.

    docker run --name sentiment-analysis -p 8000:8000 -d manhcuong8499/sentiment-analysis
  • [Optional] Verify the application is running.

    docker ps
    docker logs sentiment-analysis
    • The below result is the output of console:

    Watching for file changes with StatReloader Performing system checks...

    2023-10-11 04:12:50.799856: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2023-10-11 04:12:50.799869: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. System check identified no issues (0 silenced). October 11, 2023 - 04:12:51 Django version 3.1.4, using settings 'shopee_sentiment.settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C.

  • Visit the http://localhost:8000 to see the application.

3. Demo and usage

  • Realtime video demo with so cute host: https://youtu.be/iQgCI3D1mdo

  • After you run the application successfully, enter your comment at the textarea component, then click the button Send and wait a bit to get the predicted result.

  • Let's try with some positive comments.

    • With this comment, the model predict exactly. You can see predicted probability of positive value is higher than negative value, so really this is a positive comment.
    • Some images below for other positive comments.
  • OK, let's try with some negative comments.

    • Let leave only the thumbs-down emoji to see how the model will deal with.
    • Some images below for other negative comments.
  • OK, cool. Thank you so much. Let clone or download as zip my application and run on your machine. See you ๐Ÿ˜.

scl_khvw_sentiment_analysis_project's People

Contributors

cuongpiger avatar ddiem-ri-4d avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.