fix gradio themes not applying

This commit is contained in:
AUTOMATIC1111 2023-08-09 21:19:33 +03:00
parent edfae9e78a
commit 66c32e40e8
1 changed files with 2 additions and 2 deletions

View File

@ -59,8 +59,8 @@ def reload_gradio_theme(theme_name=None):
shared.gradio_theme = gr.themes.ThemeClass.load(theme_cache_path)
else:
os.makedirs(theme_cache_dir, exist_ok=True)
gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)
gradio_theme.dump(theme_cache_path)
shared.gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)
shared.gradio_theme.dump(theme_cache_path)
except Exception as e:
errors.display(e, "changing gradio theme")
shared.gradio_theme = gr.themes.Default(**default_theme_args)