feat: update version to 0.4.1-dev, refactor task imports, and replace Textract processing with Azure Document Intelligence

This commit is contained in:
Christian Krakau-Louis
2025-04-02 15:46:56 +02:00
parent 4ca0ce8d4f
commit 619c72ac53
8 changed files with 125 additions and 84 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import fitz # PyMuPDF for checking embedded text
from app.config import settings
from app.tasks.retry_config import BaseTaskWithRetry
from app.tasks.process_with_textract import process_with_textract
from app.tasks.process_with_azure_document_intelligence import process_with_azure_document_intelligence
from app.tasks.extract_metadata_with_gpt import extract_metadata_with_gpt
from app.celery_app import celery
from app.database import SessionLocal
@@ -99,6 +99,6 @@ def process_document(original_local_file: str):
extract_metadata_with_gpt.delay(new_filename, extracted_text)
return {"file": new_local_path, "status": "Text extracted locally"}
# 3. If no embedded text, queue Textract processing
process_with_textract.delay(new_filename)
# 3. If no embedded text, queue Azure Document Intelligence processing
process_with_azure_document_intelligence.delay(new_filename)
return {"file": new_local_path, "status": "Queued for OCR"}