A Telegram bot that uses AI image processing to remove the background from images.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Clone the repository
git clone https://github.com/habitual69/cutimagebg_bot.git
- Install the requirements
pip install -r requirements.txt
-
create .env file and put API_ID, API_HASH,BOT_TOKEN varible with values
-
Run the bot
python bot.py
This guide will show you how to deploy the Telegram bot using Docker.
- Docker installed on your machine
- Telegram API credentials (API ID ,API hash, BOT TOKEN)
.env
file containing Telegram API credentials
To build the Docker image, run the following command in the root directory of the project:
docker build -t my_bot .
This command will create an image with the name 'my_bot' using the current directory as the build context.
To run the Telegram bot in a Docker container, use the following command:
docker run -it --env-file .env my_bot
- Start a conversation with the bot.
- Send an image to the bot.
- The bot will use AI image processing to remove the background from the image and send the new image back to you.
The bot can be deployed on a server or a hosting platform, such as Heroku.
- pyrogram - MTProto library for Telegram
- rembg - A python library for removing the background from images.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Your Name - Initial work - Your GitHub
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used
- Inspiration
- Thanks to Daniel Gatis for rembg