Note: the bot is just a proof of concept. If you are interested in enhancing it, I'll be happy to collaborate!
- Pull the repository
- Create a virtual env and activate it
- Install dependencies: pip install -r requirements.txt
- Download and copy the trained models (links are given below) to the root of the project (the same directory where
manage.py
lives)
- Unsupervised model (Kloop model)
- Ң vs Н classification model
- Ө vs О classification model
- Ү vs У classification model
- Create
.env
file (just rename the template fileenv_template
to.env
) - Go to Telegram's Botfather and register a new bot
- Write its credentials (BOT_TOKEN and BOT_USERNAME) to your
.env
file - Activate your virtual env and run
python manage.py tgbotwebhook
. After that you will see a promptEnter bot username:
. Write there your bot's username and as the next step you'll have to choose one of the two options. Select 1 and set your hostname (example: https://yourawesomesite.com). - Send some sentences to your bot. For example:
комур жакканда зыян тутун чыгат
. The bot will respond withкөмүр жакканда зыян түтүн чыгат
.
- Register your bot and setup the project (see the previous section)
- Download and run
ngrok
(e.g. ./ngrok http 8000) - Run your django (e.g. ./manage.py runserver 8000)
- Register your ngrok's URL as a host for webhook by running
python manage.py tgbotwebhook
(e.g. https://ff24e741518f.ngrok.io). See Step #4 of the previous section of this README. - Now your bot can be served from your local computer!