ravimashru / slack-channel-sentiment-analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slack-channel-sentiment-analyzer

Execute SA Server Locally

Prerequisites

brew install python3
pip3 install -r requirements.txt

Create a .env file inside the server folder using the template file .env.template. Add all the required environment variables to the file (e.g. Slack bot token).

cd server  
uvicorn main:app --reload

How it Works

We created a Slack App called Sentiment Analyzer which has the corresponding read messages of public channels permissions - see scopes file in assets folder.

We added this Slack App (via a slash command ("/invite")) in all channels for which we would like to conduct the sentiment analysis - see also screenshot in assets folder.

We took the token from "OAUTH Tokens for your Workspace".

... Raise an issue in case of questions. ... Raise a PR in case of improvement proposals.

Background Info

Retrieving Messages incl. Thread Messages

https://api.slack.com/messaging/retrieving

Potentially Helpful Links

  1. https://huggingface.co/transformers/model_doc/gpt.html
  2. https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment
  3. https://huggingface.co/transformers/quicktour.html

About


Languages

Language:Python 45.3%Language:HTML 35.7%Language:CSS 19.0%