Download tests/conftest.py from drowzeys/keys-Auto-Receipts-Studio: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/drowzeys/keys-Auto-Receipts-Studio/resolve/main/tests/conftest.py
- Command line
-
hf download hf://drowzeys/keys-Auto-Receipts-Studio/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/drowzeys/keys-Auto-Receipts-Studio/resolve/main/tests/conftest.py
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() | |
| 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, | |
| ) | |