-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
50 lines (36 loc) · 1.87 KB
/
config.py
File metadata and controls
50 lines (36 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""
Configuration for the photo selection app.
Stores folder paths, batch size, and model name.
Uses environment variables for secrets; paths can be overridden via env or defaults.
"""
import os
from pathlib import Path
# -----------------------------------------------------------------------------
# Folder paths
# -----------------------------------------------------------------------------
# Default source folder for images (can be overridden by CLI or env)
DEFAULT_SOURCE_FOLDER = os.environ.get("SOURCE_FOLDER", str(Path.home() / "Pictures" / "Photos"))
# Name of the subfolder where selected photos will be moved
SELECTED_FOLDER_NAME = "Selected"
# Name of the file that stores selected photo filenames (appended to)
SELECTED_PHOTOS_FILE = "selected_photos.txt"
# -----------------------------------------------------------------------------
# Batching and selection limits
# -----------------------------------------------------------------------------
# Number of images to send to the AI in each API call
BATCH_SIZE = 10
# Total number of photos to select across all batches (cap)
MAX_SELECTED_TOTAL = 20
# Maximum number of photos to select per batch (1 = pick single best per batch)
MAX_SELECTED_PER_BATCH = 1
# -----------------------------------------------------------------------------
# OpenAI
# -----------------------------------------------------------------------------
# Vision model capable of image analysis (e.g. gpt-4o, gpt-4o-mini, gpt-4-turbo)
OPENAI_MODEL = os.environ.get("OPENAI_MODEL", "gpt-4o-mini")
# Max retries for OpenAI API calls
OPENAI_MAX_RETRIES = 3
# -----------------------------------------------------------------------------
# Supported image extensions (case-insensitive)
# -----------------------------------------------------------------------------
IMAGE_EXTENSIONS = {".jpg", ".jpeg", ".png", ".gif", ".webp", ".heic", ".bmp", ".tiff", ".tif"}