Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
users can specify multiple style file path by using
wildcards
and multiple entries of--styles-file
Changes
cmd arg
--styles-file
change action toappend
str whitch forms a list internally same as--gradio-allowed-path
if no
--styles-file
is set by the user is then defaults to['styles.csv']
--styles-file
acceptspaths
or paths with wildcard*
also alow
?
to be used to match a single character (previously only*
can be used), https://docs.python.org/3/library/fnmatch.html#module-fnmatchDefault styles file path behavior
--styles-file
entry is use as the default styles file path*
or?
in the path, it is used as wildcard pattern, the first matching file is used as default sytylesstyles.csv
in the same dir as the first pathother changes
--styles-file
cmd arg example
use multiple
--styles-file
all at oncethis example would load
B:\\styles_dir_1\main_styles_file.csv
and use as defaultB:\\styles_dir_1\sub_styles_file.csv
load every file in
styles_dir_1
matchingprefix_
and suffix.csv
load every file in
styles_dir_2
matching suffix_suffix.csv
loda every
.csv
instyles_dir_3
@cjj1977 can you check if this satisfies your requirements
Checklist: