Rom89823974978 commited on
Commit
94d2c07
·
1 Parent(s): dff1399

Optimization lag

Browse files
Files changed (1) hide show
  1. backend/main.py +2 -3
backend/main.py CHANGED
@@ -56,7 +56,6 @@ class Settings(BaseSettings):
56
  # Models
57
  embedding_model: str = "sentence-transformers/LaBSE"
58
  llm_model: str = "google/flan-t5-base"
59
- #"google/mt5-base"#"meta-llama/Llama-3.2-1B-Instruct"#"meta-llama/Llama-3.2-3B-Instruct"#"google/flan-t5-base"#"google/mt5-base"#"bigscience/bloomz-560m"#"bigscience/bloom-1b7"#"google/mt5-small"#"bigscience/bloom-3b"#"RedHatAI/Meta-Llama-3.1-8B-Instruct-quantized.w4a16"
60
  cross_encoder_model: str = "cross-encoder/mmarco-mMiniLMv2-L12-H384-v1"
61
  # RAG parameters
62
  chunk_size: int = 750
@@ -915,10 +914,10 @@ def get_filters(request: Request):
915
  return {
916
  "statuses": normalize(df["status"].to_list()),
917
  "legalBases": normalize(df["legalBasis"].to_list()),
918
- "organizations": normalize(df["list_name"].explode().to_list()),
919
  "countries": normalize(df["list_country"].explode().to_list()),
920
  "fundingSchemes": normalize(df["fundingScheme"].explode().to_list()),
921
- "ids": normalize(df["id"].to_list()),
922
  }
923
 
924
  @app.get("/api/stats")
 
56
  # Models
57
  embedding_model: str = "sentence-transformers/LaBSE"
58
  llm_model: str = "google/flan-t5-base"
 
59
  cross_encoder_model: str = "cross-encoder/mmarco-mMiniLMv2-L12-H384-v1"
60
  # RAG parameters
61
  chunk_size: int = 750
 
914
  return {
915
  "statuses": normalize(df["status"].to_list()),
916
  "legalBases": normalize(df["legalBasis"].to_list()),
917
+ "organizations": normalize(df["list_name"].explode().to_list())[:500],
918
  "countries": normalize(df["list_country"].explode().to_list()),
919
  "fundingSchemes": normalize(df["fundingScheme"].explode().to_list()),
920
+ #"ids": normalize(df["id"].to_list()),
921
  }
922
 
923
  @app.get("/api/stats")