gavinzli commited on
Commit
83747e9
·
1 Parent(s): 44b626e

Update attachments directory to use cache and simplify embeddings model initialization

Browse files
app/controllers/mail.py CHANGED
@@ -21,7 +21,7 @@ from models.mails import build_gmail_service
21
  SCOPES = ["https://www.googleapis.com/auth/gmail.readonly"]
22
  EMAIL_PATTERN = r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
23
 
24
- ATTACHMENTS_DIR = "attachments"
25
  os.makedirs(ATTACHMENTS_DIR, exist_ok=True)
26
 
27
  service = build_gmail_service()
 
21
  SCOPES = ["https://www.googleapis.com/auth/gmail.readonly"]
22
  EMAIL_PATTERN = r"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"
23
 
24
+ ATTACHMENTS_DIR = "cache"
25
  os.makedirs(ATTACHMENTS_DIR, exist_ok=True)
26
 
27
  service = build_gmail_service()
app/models/llm/__init__.py CHANGED
@@ -115,7 +115,7 @@ class EmbeddingsModel(Embeddings):
115
  Args:
116
  model_name (str): The name of the model to be used for sentence transformation.
117
  """
118
- self.model = SentenceTransformer(model_name, cache_folder="/app/cache")
119
 
120
  def embed_documents(self, documents: List[str]) -> List[List[float]]:
121
  """
 
115
  Args:
116
  model_name (str): The name of the model to be used for sentence transformation.
117
  """
118
+ self.model = SentenceTransformer(model_name)
119
 
120
  def embed_documents(self, documents: List[str]) -> List[List[float]]:
121
  """