GithubHelp home page GithubHelp logo

dongido001 / pusher-chat-sentiment-analysis Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 11.0 2.34 MB

A tutorial series demonstrating how to get a sentiment analysis on chat messages

JavaScript 7.55% HTML 2.51% Vue 60.41% Python 29.53%
pusher channels flask sentiment-analysis machine machine-learning python

pusher-chat-sentiment-analysis's Introduction

One-to-one private chat with sentiment analysis using Pusher Channels, Flask and Vue.js

This tutorial series demonstrates how to build a chat app with sentiment analysis using Pusher Channels, Flask and Vue.js. You can read the tutorial on how it was built here:

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

This application uses the following:

Setting up the project

First, clone this repository to your local machine:

 $ git clone https://github.com/dongido001/pusher-chat-sentiment-analysis.git

Next, update the following keys in the api/.env file with your correct Pusher keys:

PUSHER_APP_ID=app_id
PUSHER_KEY=key
PUSHER_SECRET=secret
PUSHER_CLUSTER=cluster

Then, update the .env file in the project’s root folder with your correct Pusher App key:

    VUE_APP_PUSHER_KEY=<PUSHER_APP_KEY>
    VUE_APP_PUSHER_CLUSTER=<PUSHER_APP_CLUSTER>

Running the Apps

Run the Flask app

  • Using your terminal, navigate into the Flask folder - api:
    $ cd api
  • Create a virtual environment:
python3 -m venv env
  • Activate the virtual environment:
  source env/bin/activate

On windows? Activate it with the below:

  source env/Scripts/activate
  • Install the dependencies:
pip install -r requirements.txt
  • Download NLTK corpora:

$ python -m textblob.download_corpora lite

  • Finally run the app:
 flask run

Check the URL where Flask is running - http://localhost:5000. You will get a text "Pong!".

Run the Vue app

Open a new terminal window, then navigate into the projects root folder - one-to-one chat:

Install dependencies:

npm install

Then run the app:

    $ npm run serve

Built With

  • Flask - A microframework for Python
  • Pusher - APIs to enable devs building realtime features
  • Vue.js - A JavaScript Framework for building User Interfaces

pusher-chat-sentiment-analysis's People

Contributors

dongido001 avatar fisayoafolayan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pusher-chat-sentiment-analysis's Issues

I'm interested in testing and modifying this project a bit..but it seems severely outdated

It's a very cool concept and I'm interested in playing around with it a bit, but so far I've been running into many issues some of which i'm not sure if it was just a me thing or something with the project itself. Some are with outdated modules.

For example the later versions of python don't have the clock attribute under time.

I seem to have fixed that particular issue, but now even after creating the registration and getting a message from postman that the user was successfully created I still get login failed error.

Please update, or help me navigate these errors. I'm mainly interested in adding a user registration option to the main interface rather than requiring to do it via postman.

What service would I use if I want to deploy both on one server? And need to resolve database issues

I have taken this application, and altered it into something significantly different and now I'm seeking to deploy this app. Currently I have the frontend (which would be localhost:8080) running on firebase, and I have the backend (which would've been localhost:5000) on pythonanywhere? Anywhere where I could use one service and have them both deployed?

Also when I try to get or post data to the database I receive this error on my backend:

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.id AS users_id, users.username AS users_username, users.password AS users_password \nFROM users \nWHERE users.username = ?\n LIMIT ? OFFSET ?'] [parameters: ('jama juice', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8)

Anyway I can resolve this database issue? I have everything set up correctly.

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.