prthm11 commited on
Commit
98a8412
·
verified ·
1 Parent(s): 3d99439

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -2496,11 +2496,16 @@ def similarity_matching(sprites_data: dict, project_folder: str) -> str:
2496
  # =========================================
2497
  # Copy matched backdrop assets + collect
2498
  # =========================================
 
 
 
2499
  backdrop_data = []
2500
  copied_backdrop_folders = set()
2501
  for backdrop_idx, matched_idx in enumerate(most_similar_indices):
2502
- matched_image_path = folder_image_paths[matched_idx]
 
2503
  matched_folder = os.path.dirname(matched_image_path)
 
2504
  matched_filename = os.path.basename(matched_image_path)
2505
 
2506
  # CHANGED: use our new normalized backdrop_base_path
 
2496
  # =========================================
2497
  # Copy matched backdrop assets + collect
2498
  # =========================================
2499
+ # =========================================
2500
+ # Copy matched backdrop assets + collect
2501
+ # =========================================
2502
  backdrop_data = []
2503
  copied_backdrop_folders = set()
2504
  for backdrop_idx, matched_idx in enumerate(most_similar_indices):
2505
+ # FIXED: Use the correct variable name
2506
+ matched_image_path = IMAGE_PATHS[matched_idx]
2507
  matched_folder = os.path.dirname(matched_image_path)
2508
+ # ... rest of the loop
2509
  matched_filename = os.path.basename(matched_image_path)
2510
 
2511
  # CHANGED: use our new normalized backdrop_base_path