Fix problem when --data-dir is specified

This commit is contained in:
nonnonstop
2023-04-22 15:00:31 +09:00
parent c205251c65
commit 5222919ebb
3 changed files with 20 additions and 15 deletions
+2 -2
View File
@@ -16,6 +16,6 @@ parser_pre.add_argument("--models-dir", type=str, default="models", help="base p
cmd_opts_pre = parser_pre.parse_known_args()[0]
data_path = cmd_opts_pre.data_dir
models_path = os.path.join(cmd_opts_pre.models_dir)
models_path = os.path.join(data_path, cmd_opts_pre.models_dir)
extensions_dir = os.path.join(data_path, "extensions")
extensions_builtin_dir = os.path.join(data_path, "extensions-builtin")
extensions_builtin_dir = os.path.join(script_path, "extensions-builtin")
+1 -1
View File
@@ -1724,7 +1724,7 @@ def html_css():
continue
head += stylesheet(cssfile)
if opts.gradio_theme == 'black-orange':
head += stylesheet(os.path.join(data_path, "javascript", "black-orange.css"))
head += stylesheet(os.path.join(script_path, "javascript", "black-orange.css"))
if os.path.exists(os.path.join(data_path, "user.css")):
head += stylesheet(os.path.join(data_path, "user.css"))
return head