Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| from pathlib import Path | |
| import os | |
| class Settings: | |
| dataset_path: Path = Path(os.getenv("BITEWISE_DATASET_PATH", "data/united_master_database_corrected.csv")) | |
| ner_model_name: str = os.getenv("BITEWISE_NER_MODEL", "Dizex/InstaFoodRoBERTa-NER") | |
| qa_model_name: str = os.getenv( | |
| "BITEWISE_QA_MODEL", | |
| "bert-large-uncased-whole-word-masking-finetuned-squad", | |
| ) | |
| semantic_model_name: str = os.getenv("BITEWISE_SEMANTIC_MODEL", "glove-wiki-gigaword-50") | |
| semantic_model_path: str = os.getenv("BITEWISE_SEMANTIC_PATH", "") | |
| enable_semantic_download: bool = os.getenv("BITEWISE_ENABLE_SEMANTIC_DOWNLOAD", "1") == "1" | |
| max_ingredients: int = int(os.getenv("BITEWISE_MAX_INGREDIENTS", "48")) | |
| similarity_threshold: float = float(os.getenv("BITEWISE_SIM_THRESHOLD", "0.52")) | |
| settings = Settings() | |