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
- (Optional) 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>/webhook
cp .env.local.exmaple .env
nano .env
export $(cat .env | xargs)
- Start database and cache
docker compose --file docker-compose.local.yml --env-file .env up -d
- Run application:
python app/main.py
- Install
docker-compose.yml
:
wget https://raw.githubusercontent.com/ptrvsrg/hotdog-or-not-bot/<release_version>/docker-compose.yml
- Install example environment file:
wget https://raw.githubusercontent.com/ptrvsrg/hotdog-or-not-bot/<release_version>/.env.docker.example
- Set up environment variables
NOTE: Initialize environment variable WEBHOOK_URL with the value <public URL>/webhook
cp .env.docker.example .env
nano .env
- Run containers:
docker compose --file docker-compose.yml --env-file .env up -d
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.