Spaces:
Sleeping
Sleeping
Fix document count to include structured data store rows
Browse filesStatus endpoint now counts Excel/CSV rows so Query tab shows documents are loaded.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
api.py
CHANGED
|
@@ -149,8 +149,10 @@ os.makedirs(UPLOAD_DIR, exist_ok=True)
|
|
| 149 |
# ββ Endpoints ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 150 |
@app.get("/api/status", response_model=StatusResponse)
|
| 151 |
def status():
|
|
|
|
|
|
|
| 152 |
return StatusResponse(
|
| 153 |
-
document_chunks=
|
| 154 |
documents_loaded=[],
|
| 155 |
uploaded_files=uploaded_files,
|
| 156 |
similarity_threshold=SIMILARITY_THRESHOLD,
|
|
|
|
| 149 |
# ββ Endpoints ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 150 |
@app.get("/api/status", response_model=StatusResponse)
|
| 151 |
def status():
|
| 152 |
+
pipeline_chunks = pipeline.document_count if pipeline else 0
|
| 153 |
+
data_store_rows = sum(len(rows) for rows in data_store.tables.values())
|
| 154 |
return StatusResponse(
|
| 155 |
+
document_chunks=pipeline_chunks + data_store_rows,
|
| 156 |
documents_loaded=[],
|
| 157 |
uploaded_files=uploaded_files,
|
| 158 |
similarity_threshold=SIMILARITY_THRESHOLD,
|