negi2725 commited on
Commit
d54f69e
·
verified ·
1 Parent(s): 5f5f26d

Update app/core/config.py

Browse files
Files changed (1) hide show
  1. app/core/config.py +6 -6
app/core/config.py CHANGED
@@ -3,18 +3,18 @@ from typing import Optional
3
  from pydantic_settings import BaseSettings
4
 
5
  class Settings(BaseSettings):
6
- # API Configuration
7
  api_title: str = "Legal RAG Analysis API"
8
  api_version: str = "1.0.0"
9
  debug: bool = False
10
 
11
- # Gemini AI Configuration
12
  gemini_api_key: str = os.getenv("GEMINI_API_KEY", "")
13
  gemini_model: str = "gemini-2.5-flash"
14
- # Hugging Face Spaces or system-level env will inject these
15
  legal_bert_model_path: str = os.environ.get("MODEL_PATH", "/tmp/legalbert_model")
16
  faiss_indexes_base_path: str = os.environ.get("FAISS_INDEX_PATH", "/tmp/faiss_indexes")
17
- # Index file paths
18
  constitution_index_path: str = f"{faiss_indexes_base_path}/constitution_bgeLarge.index"
19
  constitution_chunks_path: str = f"{faiss_indexes_base_path}/constitution_chunks.json"
20
 
@@ -33,10 +33,10 @@ class Settings(BaseSettings):
33
  case_law_index_path: str = f"{faiss_indexes_base_path}/case_faiss.index"
34
  case_law_chunks_path: str = f"{faiss_indexes_base_path}/case_chunks.pkl"
35
 
36
- # Sentence Transformer Model
37
  sentence_transformer_model: str = "BAAI/bge-large-en-v1.5"
38
 
39
- # RAG Configuration
40
  top_k_results: int = 5
41
  max_unique_chunks: int = 10
42
  confidence_threshold: float = 0.6
 
3
  from pydantic_settings import BaseSettings
4
 
5
  class Settings(BaseSettings):
6
+
7
  api_title: str = "Legal RAG Analysis API"
8
  api_version: str = "1.0.0"
9
  debug: bool = False
10
 
11
+
12
  gemini_api_key: str = os.getenv("GEMINI_API_KEY", "")
13
  gemini_model: str = "gemini-2.5-flash"
14
+
15
  legal_bert_model_path: str = os.environ.get("MODEL_PATH", "/tmp/legalbert_model")
16
  faiss_indexes_base_path: str = os.environ.get("FAISS_INDEX_PATH", "/tmp/faiss_indexes")
17
+
18
  constitution_index_path: str = f"{faiss_indexes_base_path}/constitution_bgeLarge.index"
19
  constitution_chunks_path: str = f"{faiss_indexes_base_path}/constitution_chunks.json"
20
 
 
33
  case_law_index_path: str = f"{faiss_indexes_base_path}/case_faiss.index"
34
  case_law_chunks_path: str = f"{faiss_indexes_base_path}/case_chunks.pkl"
35
 
36
+
37
  sentence_transformer_model: str = "BAAI/bge-large-en-v1.5"
38
 
39
+
40
  top_k_results: int = 5
41
  max_unique_chunks: int = 10
42
  confidence_threshold: float = 0.6