Spaces:
Runtime error
Runtime error
Update app/backend.py
Browse files33 unmodified lines343536373738394033 unmodified lines return f"Error extracting PDF text: {str(e)}"
# ✅ Chunk the text and build FAISS indexdef build_faiss_index(text, chunk_size=700, overlap=150):def build_faiss_index(text, chunk_size=1700, overlap=150): chunks = [] for i in range(0, len(text), chunk_size - overlap): chunks.append(text[i:i + chunk_size])app/backend.py+1-1