Skip to content

Commit

Permalink
Merge pull request #1 from Michilis/main
Browse files Browse the repository at this point in the history
Update pixelateTG.py
  • Loading branch information
arbadacarbaYK authored May 30, 2024
2 parents e45ce43 + 2c39884 commit 24d8f91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TELEGRAM_BOT_TOKEN=your_bot_token_here
6 changes: 5 additions & 1 deletion pixelateTG.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from dotenv import load_dotenv # Import the load_dotenv function from python-dotenv
import cv2
import random
import imageio
Expand All @@ -8,7 +9,10 @@
from mtcnn.mtcnn import MTCNN
from uuid import uuid4

TOKEN = os.environ['TELEGRAM_BOT_TOKEN']
# Load environment variables from .env file
load_dotenv()

TOKEN = os.getenv('TELEGRAM_BOT_TOKEN') # Get the Telegram bot token from the environment variable
MAX_THREADS = 15
PIXELATION_FACTOR = 0.04
RESIZE_FACTOR = 1.5 # Common resize factor
Expand Down

0 comments on commit 24d8f91

Please sign in to comment.