VeuReu commited on
Commit
95e947b
·
verified ·
1 Parent(s): 7a48af3

Update preprocessing_router.py

Browse files
Files changed (1) hide show
  1. preprocessing_router.py +22 -0
preprocessing_router.py CHANGED
@@ -206,6 +206,28 @@ async def load_casting(
206
  db_dir: str = Form("chroma_db"),
207
  drop_collections: bool = Form(False),
208
  ):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  client = ensure_chroma(Path(db_dir))
210
  n_faces = build_faces_index(Path(faces_dir), client, collection_name="index_faces", drop=drop_collections)
211
  n_voices = build_voices_index(Path(voices_dir), client, collection_name="index_voices", drop=drop_collections)
 
206
  db_dir: str = Form("chroma_db"),
207
  drop_collections: bool = Form(False),
208
  ):
209
+
210
+ # --- DEBUG DE RUTAS ---
211
+ print("👇 --- INFORMACIÓN DE RUTAS DE CÁSTING ---")
212
+ print(f"Ruta de caras (faces_dir): {faces_dir}")
213
+ print(f"Ruta de voces (voices_dir): {voices_dir}")
214
+ print(f"Ruta de DB (db_dir): {db_dir}")
215
+
216
+ # Listar qué archivos hay dentro de la carpeta de caras
217
+ if faces_dir and os.path.exists(faces_dir):
218
+ # Esto te dirá si hay subcarpetas o imágenes directas
219
+ contenido = os.listdir(faces_dir)
220
+ print(f"Archivos/Carpetas en faces_dir: {contenido}")
221
+
222
+ # Si quieres ver qué hay dentro de la primera subcarpeta (ej. 'Ana')
223
+ for item in contenido:
224
+ subruta = os.path.join(faces_dir, item)
225
+ if os.path.isdir(subruta):
226
+ print(f" Contenido de {item}: {os.listdir(subruta)[:5]}...") # Muestra los primeros 5 archivos
227
+ else:
228
+ print("⚠️ La ruta de caras no existe o está vacía.")
229
+ print("--- FIN DEL DEBUG --- 👆")
230
+
231
  client = ensure_chroma(Path(db_dir))
232
  n_faces = build_faces_index(Path(faces_dir), client, collection_name="index_faces", drop=drop_collections)
233
  n_voices = build_voices_index(Path(voices_dir), client, collection_name="index_voices", drop=drop_collections)