mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
refactor imports
This commit is contained in:
+2
-1
@@ -4,6 +4,7 @@ import gradio as gr
|
||||
import modules.shared
|
||||
import modules.extensions
|
||||
from modules.logger import log
|
||||
from modules.json_helpers import writefile
|
||||
|
||||
|
||||
gradio_theme = gr.themes.Base()
|
||||
@@ -29,7 +30,7 @@ def refresh_themes(no_update=False):
|
||||
r = modules.shared.req('https://huggingface.co/datasets/freddyaboulton/gradio-theme-subdomains/resolve/main/subdomains.json')
|
||||
if r.status_code == 200:
|
||||
res = r.json()
|
||||
modules.shared.writefile(res, themes_file)
|
||||
writefile(res, themes_file)
|
||||
else:
|
||||
log.error('Error refreshing UI themes')
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user