stivenDR14 commited on
Commit
6693c55
·
1 Parent(s): ca7c295

update models

Browse files
Files changed (2) hide show
  1. pdf_processor.py +2 -2
  2. utils.py +8 -4
pdf_processor.py CHANGED
@@ -184,8 +184,8 @@ class PDFProcessor:
184
  _, embeddings = self.set_llm(ai_model, type_model, api_key, project_id_watsonx)
185
  print("vectorstore: ", vectorstore)
186
  #delete all documents from the vectorstore
187
- #if vectorstore:
188
- # vectorstore.delete_collection()
189
 
190
  chromadb.api.client.SharedSystemClient.clear_system_cache()
191
  new_client = chromadb.EphemeralClient()
 
184
  _, embeddings = self.set_llm(ai_model, type_model, api_key, project_id_watsonx)
185
  print("vectorstore: ", vectorstore)
186
  #delete all documents from the vectorstore
187
+ if vectorstore:
188
+ vectorstore.delete_collection()
189
 
190
  chromadb.api.client.SharedSystemClient.clear_system_cache()
191
  new_client = chromadb.EphemeralClient()
utils.py CHANGED
@@ -8,16 +8,20 @@ ENVIRONMENT = os.getenv("ENVIRONMENT")
8
 
9
  if ENVIRONMENT == "dev":
10
  AI_MODELS = {
11
- "Huggingface / IBM Granite 3.2 2B Instruct": "ibm-granite/granite-3.2-2b-instruct",
12
- "Huggingface / Phi 4 mini Instruct": "microsoft/Phi-4-mini-instruct",
 
 
13
  "Huggingface / SmolLM2 1.7B Instruct": "HuggingFaceTB/SmolLM2-1.7B-Instruct",
14
  "IBM Granite3.1 dense / Ollama local": "ollama",
15
  "Open AI / GPT-4o-mini": "openai",
16
  }
17
  else:
18
  AI_MODELS = {
19
- "Huggingface / IBM Granite 3.2 2B Instruct": "ibm-granite/granite-3.2-2b-instruct",
20
- "Huggingface / Phi 4 mini Instruct": "microsoft/Phi-4-mini-instruct",
 
 
21
  "Huggingface / SmolLM2 1.7B Instruct": "HuggingFaceTB/SmolLM2-1.7B-Instruct",
22
  "Open AI / GPT-4o-mini": "openai",
23
  }
 
8
 
9
  if ENVIRONMENT == "dev":
10
  AI_MODELS = {
11
+ "Huggingface / Microsoft Phi 3.5 mini Instruct": "microsoft/Phi-3.5-mini-instruct",
12
+ "Huggingface / Mistral Nemo Instruct": "mistralai/Mistral-Nemo-Instruct-2407",
13
+ "Huggingface / Google Gemma 2 2B Instruct": "google/gemma-2-2b-it",
14
+ "Huggingface / Meta Llama 3.2 3B Instruct": "meta-llama/Llama-3.2-3B-Instruct",
15
  "Huggingface / SmolLM2 1.7B Instruct": "HuggingFaceTB/SmolLM2-1.7B-Instruct",
16
  "IBM Granite3.1 dense / Ollama local": "ollama",
17
  "Open AI / GPT-4o-mini": "openai",
18
  }
19
  else:
20
  AI_MODELS = {
21
+ "Huggingface / Microsoft Phi 3.5 mini Instruct": "microsoft/Phi-3.5-mini-instruct",
22
+ "Huggingface / Mistral Nemo Instruct": "mistralai/Mistral-Nemo-Instruct-2407",
23
+ "Huggingface / Google Gemma 2 2B Instruct": "google/gemma-2-2b-it",
24
+ "Huggingface / Meta Llama 3.2 3B Instruct": "meta-llama/Llama-3.2-3B-Instruct",
25
  "Huggingface / SmolLM2 1.7B Instruct": "HuggingFaceTB/SmolLM2-1.7B-Instruct",
26
  "Open AI / GPT-4o-mini": "openai",
27
  }