Giter Club home page Giter Club logo

discord-tumorbot's Introduction

Discord TumorBot

Discord TumorBot is a Python-based Discord bot that uses a pre-trained ResNet-50 model to classify brain tumor types from uploaded images. It allows users to interact with the bot using slash commands and predict the type of tumor in medical images.

Features

  • Slash commands for interacting with the bot.
  • Predict the type of brain tumor from uploaded medical images.
  • Greet users and respond to simple commands.

Prerequisites

Before running the bot, make sure you have the following dependencies installed:

  • Python 3.8
  • Discord.py library
  • PyTorch and torchvision (CPU-compatible versions)
  • Pillow (PIL)
  • Other necessary libraries (check requirements.txt)

You can install the required packages using the provided requirements.txt file.

Setup

  1. Clone this repository to your local machine:

    git clone https://github.com/devchaitanya/discord-tumorbot.git
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows, use: venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt
  4. Invite the Bot:

    Create a Discord bot on the Discord Developer Portal and invite it to your server.

  5. Create a .env file in the root directory of the project and add your Discord bot token:

    DISCORD_TOKEN=your_discord_bot_token
    
  6. Load the model:

    Download the trained model from here MODEL

    Make sure you have the ResNet-50 model weights saved in the correct location (DiscordBot/models/bt_resnet50_model.pt) or modify the path accordingly.

  7. Run the bot:

    python discord_bot.py

Usage

  • Use the /predict command in your Discord server to upload a medical image and receive the predicted brain tumor type.

discord-tumorbot's People

Contributors

devchaitanya avatar

Stargazers

HRRhere avatar Girish theja 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.