The Caption & Hashtag Recommender Bot is a Telegram bot that helps users generate captions and hashtags for their social media posts. Users can send either a text description or an image, and the bot will provide relevant hashtags and captions using the Groq API and Groq Vision.
This project is containerized using Docker for easy deployment and scalability.
- Text Input: Generate hashtags for a text description.
- Image Input: Generate captions and hashtags for an image.
- AI-Powered: Uses Groq API for text and image analysis.
- Dockerized: Easy to deploy using Docker.
- Python: Backend logic.
- Groq API: For AI-based text and image analysis.
- python-telegram-bot: To interact with Telegram's API.
- Docker: For containerization and deployment.
- Telegram Bot Token: Create a bot using BotFather and get the token.
- Groq API Key: Sign up for Groq API and get your API key.
- Docker: Install Docker from here.
git clone https://github.com/We4TechAI/Caption-Hashtag-Recommender.git
cd Caption-Hashtag-Recommender
Create a .env
file in the root directory and add the following:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
GROQ=your_groq_api_key
docker build --tag caption_hashtag_recommender:latest .
docker run -d --name caption_hashtag_recommender caption_hashtag_recommender:latest
- /start: Start the bot and see a welcome message.
- Text Input: Send a text description, and the bot will generate hashtags.
- Example:
"Just had an amazing coffee at a cozy café!"
- Bot Response:
Generated Hashtags: #coffee #café #cozyvibes #coffeelover #coffeetime
- Example:
- Image Input: Send an image, and the bot will generate a caption and hashtags.
- Example: Send an image of a sunset.
- Bot Response:
Caption and Hashtags: Beautiful sunset over the horizon. #sunset #nature #photography #sunsetlover #naturelover
Caption-Hashtag-Recommender/
├── Dockerfile
├── README.md
├── requirements.txt
├── caption_hashtag_recommender.py
├── .env
- Dockerfile: Configuration for Docker container.
- README.md: This file.
- requirements.txt: Python dependencies.
- bot.py: Main bot logic.
- .env: Environment variables for API keys.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeatureName
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeatureName
). - Open a pull request.
- Groq API for providing the AI capabilities.
- python-telegram-bot for the Telegram bot framework.
- Docker for containerization.
Enjoy using the Caption & Hashtag Recommender Bot! 🎉