Spaces:
Configuration error
Configuration error
# farmlingua_backend/app/utils/config.py | |
from pathlib import Path | |
import os | |
import sys | |
BASE_DIR = Path(__file__).resolve().parents[2] | |
if str(BASE_DIR) not in sys.path: | |
sys.path.insert(0, str(BASE_DIR)) | |
EMBEDDING_MODEL = "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2" | |
STATIC_VS_PATH = BASE_DIR / "app" / "vectorstore" / "faiss_index" | |
LIVE_VS_PATH = BASE_DIR / "app" / "vectorstore" / "live_rag_index" | |
VECTORSTORE_PATH = LIVE_VS_PATH | |
WEATHER_API_KEY = os.getenv("WEATHER_API_KEY", "d72aad0c21c74cf897b105451250408") | |
CLASSIFIER_PATH = BASE_DIR / "app" / "models" / "intent_classifier_v2.joblib" | |
CLASSIFIER_CONFIDENCE_THRESHOLD = float(os.getenv("CLASSIFIER_CONFIDENCE_THRESHOLD", "0.6")) | |
EXPERT_MODEL_NAME = os.getenv("EXPERT_MODEL_NAME", "NousResearch/Nous-Hermes-2-Mistral-7B-DPO") | |
FORMATTER_MODEL_NAME = os.getenv("FORMATTER_MODEL_NAME", "google/flan-t5-large") | |
DATA_SOURCES = { | |
"harvestplus": "https://agronigeria.ng/category/news/", | |
} | |
STATES = [ | |
"Abuja", "Lagos", "Kano", "Kaduna", "Rivers", "Enugu", "Anambra", "Ogun", | |
"Oyo", "Delta", "Edo", "Katsina", "Borno", "Benue", "Niger", "Plateau", | |
"Bauchi", "Adamawa", "Cross River", "Akwa Ibom", "Ekiti", "Osun", "Ondo", | |
"Imo", "Abia", "Ebonyi", "Taraba", "Kebbi", "Zamfara", "Yobe", "Gombe", | |
"Sokoto", "Kogi", "Bayelsa", "Nasarawa", "Jigawa" | |
] | |