Chamin09's picture
initial commit
5644c15 verified
raw
history blame contribute delete
775 Bytes
from pathlib import Path
# Project paths
ROOT_DIR = Path(__file__).parent
DATA_DIR = ROOT_DIR / "data"
IMAGE_DIR = DATA_DIR / "images"
GRAPH_DIR = DATA_DIR / "graph"
# Ensure directories exist
for dir_path in [DATA_DIR, IMAGE_DIR, GRAPH_DIR]:
dir_path.mkdir(parents=True, exist_ok=True)
# Model configurations
BLIP2_MODEL_NAME = "Salesforce/blip2-opt-2.7b"
MAX_IMAGES = 100 # Maximum number of images to process
BATCH_SIZE = 4 # Batch size for image processing
# Knowledge Graph configurations
CONCEPTNET_API_BASE = "http://api.conceptnet.io"
MAX_SEARCH_DEPTH = 3
DEFAULT_SEARCH_LIMIT = 5
# Gradio interface settings
GRADIO_THEME = "default"
GRADIO_TITLE = "Semantic Image Search"
GRADIO_DESCRIPTION = "Search images using natural language and knowledge graphs"