eeuuia commited on
Commit
ca855df
·
verified ·
1 Parent(s): 3aea503

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -28
app.py CHANGED
@@ -15,30 +15,10 @@ from PIL import Image as PILImage
15
  # --- IMPORTAÇÃO DOS SERVIÇOS DE BACKEND E UTILS (CAMINHOS ATUALIZADOS) ---
16
  # ==============================================================================
17
 
18
- try:
19
- # Importa o serviço principal do seu novo local e nome
20
- from api.ltx.ltx_aduc_pipeline import video_generation_service
21
-
22
- # Importa o decorador de logging do seu novo local
23
- from api.utils.debug_utils import log_function_io
24
-
25
- # A importação do SeedVR permanece a mesma, mas verificamos sua existência
26
- from api.seedvr.seedvr_server import seedvr_aduc_pipeline as seedvr_inference_server
27
-
28
- logging.info("All backend services and utils imported successfully from new paths.")
29
-
30
- except ImportError as e:
31
- def log_function_io(func): return func
32
- logging.warning(f"Could not import a module. Some services or debug logs may be unavailable. Details: {e}")
33
- if 'video_generation_service' not in locals():
34
- logging.critical(f"FATAL: Main LTX service (ltx_aduc_pipeline) failed to import.", exc_info=True)
35
- sys.exit(1)
36
- if 'seedvr_inference_server' not in locals():
37
- seedvr_inference_server = None
38
- logging.warning("SeedVR server could not be initialized. Upscaling tab will be disabled.")
39
- except Exception as e:
40
- logging.critical(f"FATAL ERROR during backend initialization. Details: {e}", exc_info=True)
41
- sys.exit(1)
42
 
43
  # ==============================================================================
44
  # --- FUNÇÕES WRAPPER (PONTE ENTRE UI E BACKEND) ---
@@ -229,10 +209,7 @@ def _register_event_handlers(app_state: gr.State, ui: dict):
229
  # ==============================================================================
230
  # --- PONTO DE ENTRADA DA APLICAÇÃO ---
231
  # ==============================================================================
232
- if __name__ == "__main__":
233
- log_level = os.environ.get("ADUC_LOG_LEVEL", "INFO").upper()
234
- logging.basicConfig(level=log_level, format='[%(levelname)s] [%(name)s] %(message)s')
235
-
236
  print("Building Gradio UI...")
237
  gradio_app = build_ui()
238
  print("Launching Gradio app...")
 
15
  # --- IMPORTAÇÃO DOS SERVIÇOS DE BACKEND E UTILS (CAMINHOS ATUALIZADOS) ---
16
  # ==============================================================================
17
 
18
+ from api.ltx.ltx_aduc_pipeline import video_generation_service
19
+ from api.utils.debug_utils import log_function_io
20
+ from api.seedvr.seedvr_server import seedvr_aduc_pipeline as seedvr_inference_server
21
+ logging.info("All backend services and utils imported successfully from new paths.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  # ==============================================================================
24
  # --- FUNÇÕES WRAPPER (PONTE ENTRE UI E BACKEND) ---
 
209
  # ==============================================================================
210
  # --- PONTO DE ENTRADA DA APLICAÇÃO ---
211
  # ==============================================================================
212
+ if __name__ == "__main__":
 
 
 
213
  print("Building Gradio UI...")
214
  gradio_app = build_ui()
215
  print("Launching Gradio app...")