rivapereira123 commited on
Commit
c9f89c9
·
verified ·
1 Parent(s): a3dabad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -226,10 +226,10 @@ class EnhancedGazaKnowledgeBase:
226
 
227
 
228
  def _batch_embed_with_retry(self, texts, batch_size=16, max_retries=3, delay=2):
229
- """Embed texts in batches with retry fallback and logging"""
230
- embeddings = []
231
- for i in range(0, len(texts), batch_size):
232
- batch = texts[i:i+batch_size]
233
  for attempt in range(max_retries):
234
  try:
235
  batch_embeddings = self.embedding_model.get_text_embedding_batch(batch)
 
226
 
227
 
228
  def _batch_embed_with_retry(self, texts, batch_size=16, max_retries=3, delay=2):
229
+ """Embed texts in batches with retry fallback and logging"""
230
+ embeddings = []
231
+ for i in range(0, len(texts), batch_size):
232
+ batch = texts[i:i+batch_size]
233
  for attempt in range(max_retries):
234
  try:
235
  batch_embeddings = self.embedding_model.get_text_embedding_batch(batch)