drowzeys's picture
Upload folder using huggingface_hub
676f5d4 verified
Raw
History Blame Contribute Delete
1.03 kB
from __future__ import annotations
import io
from pathlib import Path
import pytest
from PIL import Image
from app.config import Settings, load_settings
def tiny_jpeg() -> bytes:
image = Image.new("RGB", (16, 16), (240, 240, 240))
buf = io.BytesIO()
image.save(buf, format="JPEG")
return buf.getvalue()
@pytest.fixture
def settings(tmp_path: Path) -> Settings:
return load_settings(
root_dir=tmp_path,
data_dir=tmp_path / "data",
inbox_dir=tmp_path / "inbox",
processing_dir=tmp_path / "processing",
processed_dir=tmp_path / "processed",
failed_dir=tmp_path / "failed",
exports_dir=tmp_path / "exports",
idle_seconds=0.05,
llm_backend="gemma",
llm_route="direct",
llm_base_url="http://llm.test/v1",
llm_model="google/gemma-4-12B-it",
embed_backend="omni",
embed_base_url="http://llm.test/v1",
embed_model="google/gemma-4-12B-it",
embed_dim=8,
embed_prefix=True,
)