Spaces:
Runtime error
Runtime error
Update app/backend.py
Browse files33 unmodified lines3435363738394033 unmodified linesreturn f"Error extracting PDF text: {str(e)}"# ✅ Chunk the text and build FAISS indexdef build_faiss_index(text, chunk_size=700, overlap=150):chunks = []for i in range(0, len(text), chunk_size - overlap):chunks.append(text[i:i + chunk_size])33 unmodified lines3435363738394033 unmodified linesreturn f"Error extracting PDF text: {str(e)}"# ✅ Chunk the text and build FAISS indexdef 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