User history V2

#101
by Wauplin HF staff - opened

(related to #9, #48 and #49)

This PR updates the User History feature with a few new features:

  • "Past generations" is now in a separate tab. Makes it more versatile and less overwhelming on first page load.
  • save metadata for each image (prompts, guidance scale, nb steps, timestamp,...)
  • export button (exports user history as zip)
  • delete button (requested to respect privacy)
  • refresh button (avoid having the page reloaded all the time)
  • admin panel (how many users and images? how much storage left?)
  • works both with and without Persistent Storage. Meaning less friction for users duplicating the Space without paying for Persistent Storage. They risk loosing their history but at least the app work (with a disclaimer).

You can find a updated example of IllusionDiffusion here: https://huggingface.co/spaces/Wauplin/IllusionDiffusion (see related commit ; it's basically the same content as this PR). A migration script is included in user_history.py meaning that existing history from users will be preserved.

Also, I now made a demo Space for the "User history" feature itself. The goal is to showcase it but also encourage users to add it to their Space.
The Community Tab is open for feedback.

Preview:

(Wurstchen Space)
preview

Wauplin changed pull request title from [WIP] to User history V2
AP123 changed pull request status to merged

Sign up or log in to comment