Spaces:
Runtime error
Runtime error
Download main.py from DesarrolloTT/DataSuitePro: direct link, hf CLI and curl.
- Browser
- Download file 1.64 kB
-
https://huggingface.co/spaces/DesarrolloTT/DataSuitePro/resolve/main/main.py
- Command line
-
hf download hf://spaces/DesarrolloTT/DataSuitePro/main.py
-
curl -L -o main.py https://huggingface.co/spaces/DesarrolloTT/DataSuitePro/resolve/main/main.py
1.64 kB
| # main.py | |
| import sys | |
| import os | |
| from pathlib import Path | |
| # Agregar el directorio raíz al path de Python | |
| sys.path.append(str(Path(__file__).parent)) | |
| from config.settings import config | |
| from backend.converters.converter_engine import UniversalConverter | |
| from engines.data_engine import DataEngine | |
| class DataSuitePro: | |
| """Clase principal de la aplicación""" | |
| def __init__(self): | |
| self.converter = UniversalConverter() | |
| self.data_engine = DataEngine() | |
| self.current_project = None | |
| def run(self): | |
| """Ejecuta la aplicación en modo consola""" | |
| print("🚀 DataSuite Pro - Inicializando...") | |
| print(f"Directorio base: {config.BASE_DIR}") | |
| # Aquí se integrará la interfaz gráfica posteriormente | |
| self._run_cli_mode() | |
| def _run_cli_mode(self): | |
| """Modo línea de comandos para desarrollo""" | |
| print("\n" + "="*50) | |
| print("MODO DESARROLLO - CLI") | |
| print("="*50) | |
| while True: | |
| print("\nOpciones:") | |
| print("1. Probar conversor CSV → JSON") | |
| print("2. Probar motor de datos") | |
| print("3. Salir") | |
| choice = input("\nSelecciona una opción: ").strip() | |
| if choice == "1": | |
| self._test_converter() | |
| elif choice == "2": | |
| self._test_data_engine() | |
| elif choice == "3": | |
| print("¡Hasta luego! 👋") | |
| break | |
| else: | |
| print("❌ Opción no válida") | |
| if __name__ == "__main__": | |
| app = DataSuitePro() | |
| app.run() |