Skip to content

elijahpetty/slack-message-classification

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toxic-message-classification

This app receives incoming messages from a Slack channel, stores this real-time chat data in a Deephaven streaming table, predicts a probability of toxicity for each message, and sends a notification if a message is classified as toxic.

Components

General

  • start.sh - A helper script to launch the application.
  • docker-compose.yml - The Docker compose file that defines the Deephaven images.
  • Dockerfile - The Dockerfile for the application. Simply extends Deephaven's base image with dependencies and app-mode scripts.
  • requirements.txt - The Python dependencies for the app.

Files

  • main.py - main Python script
  • app.app - The Deephaven App Mode config file

High level overview

This app checks if a new message posted to a Slack channel reads as toxic. If so, a bot sends a warning message to the channel.

The process contains 3 steps:

  • receive slack events using the Slack Real Time Messaging API and store real-time chat data in a Deephaven streaming table
  • predict a probability of toxicity for each message
  • send a notification if a message is classified as toxic

How to run

Run sh start.sh and open http://localhost:10000/ide/

Note

This repository was built for Deephaven Community Core v0.15.1. No guarantee of forwards or backwards compatibility is given.

About

Toxic Message Classification Example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.7%
  • Dockerfile 2.0%
  • Shell 0.3%