This project is a Telegram bot that trains a model to write similarly to the user based on the conversation in Telegram. The project includes scripts for model training, inference, and the bot itself.
- Interactive Training: The bot interacts with the user in a Telegram chat to collect data and train the model.
- Real-time Inference: The trained model can generate text that mimics the user's writing style.
- Ease of Use: Simple setup and integration with Telegram.
AI.py
: Script for training the model using collected data.inference.py
: Script for running inference with the trained model.main.py
: Script for the Telegram bot implementation.requirements.txt
: List of dependencies required for the project.
Ensure you have the following installed:
- Python 3.x
- Telegram account and bot token (from BotFather)
- Required Python packages (see
requirements.txt
)
-
Clone the repository:
git clone <repository_url> cd <repository_directory>
-
Install the required packages:
pip install -r requirements.txt
-
Set up your Telegram bot:
- Create a new bot using BotFather on Telegram.
- Obtain the bot token and add it to your environment variables or directly in
bot.py
.
-
Training the Model:
- Start the bot by running:
python bot.py
- Interact with the bot in Telegram to provide training data.
- Start the bot by running:
-
Running Inference:
- Once the model is trained, run:
python inference.py
- The script will generate text based on the trained model.
- Once the model is trained, run: