Have you watched the HBO comedy series "Silicon Valley"? Have you remembered the Hotdog or Not app that Jian Yang developed? This app identifies whether something is hotdog or not.
- Detecting objects in the photo
- Hotdog prediction
- Telegram bot
- Saving dataset to Yandex Disk
Before starting, you need to have:
- Clone this project
git clone https://github.com/ptrvsrg/hotdog-or-not-bot.git
cd hotdog-or-not-bot
- Create virtual environments
python -m venv .venv
source .venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Run http tunnel
NOTE: Run in a separate terminal.
NOTE: ngrok is a globally distributed reverse proxy. We will use it to test the webhook. After launching we have to copy forwarding URL.
ngrok http 8080
- Set up environment variables
NOTE: Initialize environment variable WEBHOOK_URL with the value <public URL from ngrok>/webhook
cp .env.exmaple .env
nano .env
export $(cat .env | xargs)
- Start database and cache
docker compose --env-file .env up -d
- Migrate database
python -m yoyo apply --database postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} ${MIGRATIONS_DIR}
- Run application:
python app/main.py
If you want to contribute to the project, you can follow these steps:
- Create a fork of this repository.
- Make the necessary changes.
- Create a pull request describing your changes.