financial-rag-bot / check_docs.py
Saadiktk's picture
Initial Hugging Face Space deployment
1ae6115
Raw
History Blame Contribute Delete
421 Bytes
from app.config import get_connection
conn = get_connection()
cursor = conn.cursor()
cursor.execute(
"SELECT chunk_text, filename FROM document_chunks dc JOIN documents d ON dc.document_id = d.id WHERE chunk_text LIKE '%3 stycken%' OR chunk_text LIKE '%kylmöbler%';"
)
rows = cursor.fetchall()
print(f"Found {len(rows)} rows")
for r in rows:
print("---", r[1])
print(r[0][:300])
cursor.close()
conn.close()