Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lazarust/discordnlpbot
https://github.com/lazarust/discordnlpbot
discord discord-py huggingface sentiment-analysis summarizer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lazarust/discordnlpbot
- Owner: lazarust
- Created: 2022-01-17T17:23:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T13:24:32.000Z (6 months ago)
- Last Synced: 2024-07-08T16:42:54.405Z (6 months ago)
- Topics: discord, discord-py, huggingface, sentiment-analysis, summarizer
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Discord NLP Bot
## Setup
Currently, the discord bot is not "live" anywhere so to use it you'll have to run it locally, but since this uses Docker running the bot for your own server can be done in just a couple steps.
1. Go to the [Discord Developer](https://discord.com/developers/) site and create a new application and get the API token (under the Bot tab).
2. Go to the [HuggingFace Token](https://huggingface.co/settings/tokens) site and create a HuggingFace Interface API token.
3. Add the two tokens to your `.envrc`.
```
export DISCORD_SECRET=
export INFERENCE_API_KEY=
```
4. Finally, starting up the bot is as simple as running `docker-compose up bot`.## Usage
There are currently only two main functions/commands that are implemented both of them only work when used in a reply:
1. `/summarize` This command sends all messages in the thread of replies and passes them though [this model](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment) and returns a summary.
2. `/sentiment` Similar to the previous command, but this only takes the most recent message, passes it to [this model](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment) and returns a dictionary of sentiment predictions.## Future Plans
There are some upgrades I want to do to this bot including, creating a Slack version, and creating a Twitter version. If there are any other things
that you'd want to see added please create an issue!