-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* split history content and tab wrapper * generalize _get_row_index * add collections folder * add collections tab * update README.md
- Loading branch information
Showing
8 changed files
with
260 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ config.json | |
outputs/ | ||
favorites/ | ||
voices/ | ||
collections/ | ||
|
||
# Ignore model checkpoints | ||
data/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
import gradio as gr | ||
|
||
|
||
def get_collections(): | ||
dirs = os.listdir("collections") | ||
dirs.sort() | ||
|
||
def get_collection_path(d): | ||
return os.path.join("collections", d) | ||
|
||
return ["outputs", "favorites"] + [ | ||
get_collection_path(d) for d in dirs if os.path.isdir(get_collection_path(d)) | ||
] | ||
|
||
|
||
collections_directories_atom = gr.JSON(visible=False, value=get_collections()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.