joker7094 commited on
Commit
dd632f4
·
1 Parent(s): 57b5eed

fixing issues related to sentence-transformers

Browse files
Files changed (1) hide show
  1. query_processing.py +7 -4
query_processing.py CHANGED
@@ -14,9 +14,12 @@ import os
14
  from scraper import scrape_job_description, is_url
15
 
16
  # Set up cache directories in user's home directory
17
- cache_dir = os.path.join(os.path.expanduser("~"), ".cache", "huggingface")
18
- if not os.path.exists(cache_dir):
19
- os.makedirs(cache_dir, exist_ok=True)
 
 
 
20
 
21
  os.environ["TRANSFORMERS_CACHE"] = cache_dir
22
  os.environ["HF_HOME"] = cache_dir
@@ -181,7 +184,7 @@ def extract_attributes(distances, indices):
181
  # Use Gemma to analyze the assessment details with a structured prompt
182
  llm_chain = get_llm()
183
  analysis = llm_chain.invoke(
184
- f"""Assessment Data:
185
  {extracted_text}
186
 
187
  Please analyze this specific assessment and provide a focused, assessment-specific output with these exact section headers. Avoid general company information.
 
14
  from scraper import scrape_job_description, is_url
15
 
16
  # Set up cache directories in user's home directory
17
+ import os
18
+
19
+ # Define a user-writable cache directory
20
+ home_dir = os.path.expanduser("~")
21
+ cache_dir = os.path.join(home_dir, ".cache", "shl")
22
+ os.makedirs(cache_dir, exist_ok=True)
23
 
24
  os.environ["TRANSFORMERS_CACHE"] = cache_dir
25
  os.environ["HF_HOME"] = cache_dir
 
184
  # Use Gemma to analyze the assessment details with a structured prompt
185
  llm_chain = get_llm()
186
  analysis = llm_chain.invoke(
187
+ """Assessment Data:
188
  {extracted_text}
189
 
190
  Please analyze this specific assessment and provide a focused, assessment-specific output with these exact section headers. Avoid general company information.