Spaces:
Running
Running
from modules.data_management.unified_index_manager import UnifiedIndexManager | |
class DataProcessor: | |
def __init__(self): | |
# ... existing code ... | |
self.index_manager = UnifiedIndexManager() | |
def process_data(self, df, session_id): | |
# ... existing code ... | |
# Створюємо індекси | |
indices_result = self.index_manager.get_or_create_indices(df, session_id) | |
if "error" in indices_result: | |
logger.error(f"Помилка при створенні індексів: {indices_result['error']}") | |
else: | |
logger.info(f"Індекси успішно створено: {indices_result['indices_dir']}") | |
return { | |
"success": True, | |
"processed_data": df, | |
"indices_info": indices_result | |
} |