|
@@ -8,11 +8,11 @@ import subprocess
|
|
|
|
|
|
|
|
def main():
|
|
def main():
|
|
|
# 🎯 在当前进程中激活适配器
|
|
# 🎯 在当前进程中激活适配器
|
|
|
- if os.getenv("PADDLEX_ENABLE_TABLE_ADAPTER", "").lower() in ("true", "1", "yes"):
|
|
|
|
|
|
|
+ if os.getenv("PADDLEX_ENABLE_ADAPTER", "").lower() in ("true", "1", "yes"):
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'adapters'))
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'adapters'))
|
|
|
try:
|
|
try:
|
|
|
- from adapters import apply_table_recognition_adapter
|
|
|
|
|
- if apply_table_recognition_adapter():
|
|
|
|
|
|
|
+ from adapters import apply_table_recognition_adapter, apply_enhanced_doc_preprocessor
|
|
|
|
|
+ if apply_table_recognition_adapter() and apply_enhanced_doc_preprocessor():
|
|
|
print("✅ Adapter activated in wrapper process")
|
|
print("✅ Adapter activated in wrapper process")
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
print(f"⚠️ Failed to activate adapter: {e}")
|
|
print(f"⚠️ Failed to activate adapter: {e}")
|