From dc84ac704800fd4cecb4b241756976005eb5c327 Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Tue, 16 Sep 2025 01:26:43 +0200 Subject: [PATCH] backend --- current_backend_output.json | 80 +++++++++++++++++++++++++++++++++++++ src/views/UploadView.tsx | 3 -- 2 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 current_backend_output.json diff --git a/current_backend_output.json b/current_backend_output.json new file mode 100644 index 0000000..7071a0f --- /dev/null +++ b/current_backend_output.json @@ -0,0 +1,80 @@ +{ + "document": { + "id": "doc-1757978779922", + "fileName": "IMG_20250902_162210.jpg", + "fileSize": 980755, + "mimeType": "image/jpeg", + "uploadTimestamp": "2025-09-15T23:26:19.922Z" + }, + "classification": { + "documentType": "Document", + "confidence": 0.6, + "subType": "Document", + "language": "fr", + "pageCount": 1 + }, + "extraction": { + "text": { + "raw": "4 . al -e ge :\na 4 mT. a ES Se Gaga EES hoe i -\na\nLo ee\nBaie: JERE REEMISEEE -\n1 ss : :-\n1) Carevalablejusques: 17.01.2033 À\n3 déévét: 1801 2018 : Ë 3\n\n Ban a / J\n\nPoa mec penses . -\n", + "processed": "4 . al -e ge :\na 4 mT. a ES Se Gaga EES hoe i -\na\nLo ee\nBaie: JERE REEMISEEE -\nl ss : :-\nl) Carevalablejusques: l7.ol.2oee À\ne déévét: l8ol 2ol8 : Ë e\n\n Ban a / J\n\nPoa mec penses . -\n", + "wordCount": 48, + "characterCount": 338, + "confidence": 0.28 + }, + "entities": { + "persons": [ + { + "id": "identity-0", + "type": "person", + "firstName": "Se", + "lastName": "Gaga", + "role": null, + "email": null, + "phone": null, + "confidence": 0.9, + "source": "rule-based" + } + ], + "companies": [], + "addresses": [], + "financial": { + "amounts": [], + "totals": {}, + "payment": {} + }, + "dates": [], + "contractual": { + "clauses": [], + "signatures": [] + }, + "references": [] + } + }, + "metadata": { + "processing": { + "engine": "4NK_IA_Backend", + "version": "1.0.0", + "processingTime": "4948ms", + "ocrEngine": "tesseract.js", + "nerEngine": "rule-based", + "preprocessing": { + "applied": true, + "reason": "Image preprocessing applied" + } + }, + "quality": { + "globalConfidence": 0.6, + "textExtractionConfidence": 0.28, + "entityExtractionConfidence": 0.9, + "classificationConfidence": 0.6 + } + }, + "status": { + "success": true, + "errors": [], + "warnings": [ + "Aucune signature détectée" + ], + "timestamp": "2025-09-15T23:26:19.922Z" + } +} diff --git a/src/views/UploadView.tsx b/src/views/UploadView.tsx index d5ec1e1..f491a34 100644 --- a/src/views/UploadView.tsx +++ b/src/views/UploadView.tsx @@ -114,9 +114,6 @@ export default function UploadView() { // Bootstrap: charger automatiquement les fichiers de test et les traiter en parallèle useEffect(() => { if (bootstrapped || !import.meta.env.DEV) return - // Désactivé temporairement pour éviter les appels multiples - setBootstrapped(true) - return const load = async () => { console.log('🔄 [BOOTSTRAP] Chargement automatique des fichiers de test...')