Wauplin HF staff commited on
Commit
3b961b1
1 Parent(s): 9904ca7

Update gallery_history.py

Browse files
Files changed (1) hide show
  1. gallery_history.py +3 -2
gallery_history.py CHANGED
@@ -104,8 +104,9 @@ def _update_user_history(
104
  images = [] # No history yet
105
 
106
  # Copy images to persistent folder
107
- for src_path, prompt in new_images:
108
- images.append((_copy_image(src_path), prompt))
 
109
 
110
  # Save and return
111
  path.write_text(json.dumps(images))
 
104
  images = [] # No history yet
105
 
106
  # Copy images to persistent folder
107
+ images = [
108
+ (_copy_image(src_path), prompt) for src_path, prompt in new_images
109
+ ] + images
110
 
111
  # Save and return
112
  path.write_text(json.dumps(images))