fix(gui): Retirer paramètre use_vlm non supporté par process_pdf
This commit is contained in:
@@ -761,7 +761,6 @@ class App:
|
|||||||
ner_manager=active,
|
ner_manager=active,
|
||||||
ner_thresholds=thresholds,
|
ner_thresholds=thresholds,
|
||||||
ogc_label=ogc,
|
ogc_label=ogc,
|
||||||
use_vlm=vlm_active,
|
|
||||||
vlm_manager=self._vlm_manager if vlm_active else None,
|
vlm_manager=self._vlm_manager if vlm_active else None,
|
||||||
)
|
)
|
||||||
self.queue.put(UiMessage(kind=MsgType.LOG, text=f"\u2713 {pdf.name}"))
|
self.queue.put(UiMessage(kind=MsgType.LOG, text=f"\u2713 {pdf.name}"))
|
||||||
|
|||||||
28
test_gui_error.py
Normal file
28
test_gui_error.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Test pour reproduire l'erreur du GUI."""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
import anonymizer_core_refactored_onnx as core
|
||||||
|
|
||||||
|
# Tester avec un seul PDF
|
||||||
|
test_pdf = Path("/home/dom/Téléchargements").rglob("*.pdf")
|
||||||
|
test_pdf = next(test_pdf, None)
|
||||||
|
|
||||||
|
if test_pdf:
|
||||||
|
print(f"Test avec: {test_pdf}")
|
||||||
|
try:
|
||||||
|
result = core.process_pdf(
|
||||||
|
test_pdf,
|
||||||
|
Path("/tmp/test_gui"),
|
||||||
|
make_vector_redaction=False,
|
||||||
|
also_make_raster_burn=True,
|
||||||
|
config_path=Path("config/dictionnaires.yml"),
|
||||||
|
use_hf=False,
|
||||||
|
)
|
||||||
|
print(f"✅ Succès: {result}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Erreur: {e}")
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
else:
|
||||||
|
print("Aucun PDF trouvé")
|
||||||
Reference in New Issue
Block a user