Spaces:
Sleeping
Sleeping
Add settings configuration using Pydantic
Browse files- settings.py +12 -0
settings.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
from pydantic import BaseModel
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class Settings(BaseModel):
|
| 6 |
+
clip_model_id: str = "openai/clip-vit-base-patch32"
|
| 7 |
+
max_image_mb: int = 8
|
| 8 |
+
default_domain_top_n: int = 2
|
| 9 |
+
default_top_k: int = 5
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
settings = Settings()
|