Skip to content

A Telegram bot for text summary generation

License

Notifications You must be signed in to change notification settings

kaydotdev/in-a-word-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IN A WORD BOT

Telegram bot link

Techstack

GCP Python Jupyter Pytorch ONNX Redis

Description

Finding the right information in the digital era may be the real challenge nowadays because it's growing exponentially day by day! Whether you are a student preparing an essay or a researcher working with the knowledge base, you spend a lot of time searching, filtering, and summarizing text. Google can assist you with the first two steps, but I will help with the last one! Send me a plain text, file, or link to an external resource, and I will summarize it for you in a word 😁.

Getting started

Run bot locally

First, change the directory from the root to the src:

cd src

If you have a virtual environment, activate it:

source venv/bin/activate

Set environment variables:

export ENV_API_TOKEN=...
export ENV_MAX_MESSAGE_LENGTH=...
export ENV_MAX_FILE_SIZE=...

export ENV_REPO_LINK=...
export ENV_DEV_LINK=...

export ENV_WEBHOOK_MODE=...

# Optional if ENV_WEBHOOK_MODE is False
export ENV_WEBHOOK_HOST=...
export ENV_WEBHOOK_PATH=...

export ENV_WEBAPP_HOST=...
export ENV_WEBAPP_PORT=...

Run bot in Python interpreter mode:

python main.py

Optionally, run bot on a gunicorn server (webhook mode ONLY):

gunicorn main:app --bind localhost:8080 --worker-class aiohttp.GunicornUVLoopWebWorker