29 lines
947 B
Python
29 lines
947 B
Python
import sys
|
|
import os
|
|
|
|
# Add the workspace directory to path
|
|
workspace_dir = os.path.dirname(os.path.abspath('.'))
|
|
if workspace_dir not in sys.path:
|
|
sys.path.insert(0, workspace_dir)
|
|
|
|
# Test the document processor imports
|
|
try:
|
|
# Import from LightRAG-main directory
|
|
sys.path.insert(0, os.path.join(workspace_dir, 'LightRAG-main'))
|
|
from lightrag.document_processor import get_document_processor
|
|
print('✅ Document processor import successful')
|
|
|
|
# Test OCR processor import
|
|
from simple_ocr_processor import get_simple_ocr_processor
|
|
print('✅ Simple OCR processor import successful')
|
|
|
|
# Test image classifier import
|
|
from fast_image_classifier import FastImageClassifier
|
|
print('✅ Fast image classifier import successful')
|
|
|
|
print('🎉 All Web UI imports are working correctly!')
|
|
|
|
except Exception as e:
|
|
print(f'❌ Import error: {e}')
|
|
import traceback
|
|
traceback.print_exc() |