This repo contains code to deploy Facebook's Nougat model as a Modal function. In addition, there is a Telegram bot that takes an image sent to the chat and passes it to the deployed model for OCR. The results are returned in the chat.
- Create a Telegram bot using the @BotFather
- Create a
.env
file based on.env.example
and add the necessary token and ids. Telegram ids can be found out by sending a message to @getidsbot. - Run or inspect the following script to deploy model in Modal and start Telegram bot.
./deploy.sh
Send photos of text on which to run the Nougat OCR to your Telegram bot.
Parts of the Telegram bot code were taken from the excellent chatgpt-telegram-bot.