This bot promotes environmental awareness by allowing users to classify trash, submit photos and videos, and earn points for responsible waste disposal. Administrators review submissions, and a leaderboard tracks top contributors.
- Trash Classification: Classifies trash using a TensorFlow Lite model. Model can analysie class_names as cardboard, glass, metal, paper, plastic, trash.
- Geolocation Tracking: Users can send their location with waste images.
- Submission Approval: Admins approve or reject user submissions via inline buttons.
- Point System: Users earn points for approved submissions, with a leaderboard to track top contributors.
- Database Integration: Tracks user points and submissions using SQLite.
- Geolacation of trash places
- Python check the runtime.txt
- Telegram Bot API Token
- TensorFlow Lite Runtime
- PIL (Pillow)
- SQLite3
- Nest Asyncio
- Python-Telegram-Bot
- folium
-
Clone the repository:
git clone https://github.com/Eraly-ml/eco_AI.git cd repository -
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
export TELEGRAM_BOT_TOKEN=your_token_here export ADMIN_CHAT_ID=your_admin_chat_id
-
Run the bot:
python eco_tg_bot.py
/start: Register yourself in the system./my: View your current points./stat <user_id>: Check the points of a specific user./top: View the leaderboard./myid: Retrieve your Telegram user ID.
- Send Location: Share the location of the waste.
- Send Photo: Upload a photo of the waste.
- Send Video: Upload a video showing proper disposal.
- Admin Review: Submission is reviewed by an admin.
- Earn Points: Approved submissions earn points.
- Approve or reject submissions directly from the chat interface.
- Review photos and videos attached to submissions.
repository/
├── eco_tg_bot.py # Main bot script
├── model.tflite # TensorFlow Lite model
├── requirements.txt # Python dependencies
├── bot_database.db # SQLite database (auto-generated)
└── README.md # Project documentation
- Telegram Bot API: For user interaction.
- TensorFlow Lite: For lightweight trash classification.
- SQLite: To store user data and track points.
- Pillow: For image preprocessing.
- Users interact with the bot via commands and share location, photos, and videos.
- The bot classifies the photo of trash by using a pre-trained MobileNet TensorFlow Lite model.
- Submissions are reviewed by an admin and sendet to private chat of admins.
- Approved submissions earn points and update the leaderboard.
User data is used exclusively for bot functionality and to evaluate user contributions.
Currently, contribution guidelines are informal. Feel free to reach out via Telegram: @eralyf
This project is licensed under the Apache 2.0. License. See the LICENSE file for details, also we use liberies like python-telegram-bot from telegram
For questions or contact the repository owner use telegram @eralyf
If you'd like to support my work, consider subscribing to my Telegram channel:
🔗 EraJustML
Your support means a lot!