a
    Ad                     @   sB   d dl Z d dlZd dlmZmZ d dlmZ g dZdddZ	dS )    N)errorsshared)script_path)zgradio/basezgradio/glasszgradio/monochromezgradio/seafoamzgradio/softzgradio/dracula_testzabidlabs/dracula_testzabidlabs/Limezabidlabs/pakistanzAma434/neutral-barlowzdawood/microsoft_windowszfinlaymacklon/smooth_slatezFranklisi/darkmodezfreddyaboulton/dracula_revampedzfreddyaboulton/test-bluezgstaff/xkcdzInsuz/MochazInsuz/SimpleIndigozJohnSmith9982/small_and_prettyznota-ai/themeznuttea/SoftbluezParityError/Animezreilnuud/politezremilia/Ghostlyz rottenlittlecreature/Moon_Goblinzstep-3-profit/Midnight-DeepzTaithrah/Minimalzysharma/huggingfacezysharma/steampunkzNoCrypt/mikuc              
   C   s
  | st jj} tg dg dd}| dkr>tjjf i |t _nztj	t
dd}tj	|| dd d	}t jjrtj|rtjj|t _n*tj|d
d tjj| t _t j| W nF ty } z,t|d tjjf i |t _W Y d }~n
d }~0 0 d S )N)zSource Sans Prozui-sans-serifz	system-uiz
sans-serif)zIBM Plex Monozui-monospaceConsolas	monospace)font	font_monoDefaulttmpZgradio_themes/_z.jsonT)exist_okzchanging gradio theme)r   optsgradio_themedictgrthemesr	   ospathjoinr   replaceZgradio_themes_cacheexists
ThemeClassloadmakedirsfrom_hubdump	Exceptionr   display)
theme_nameZdefault_theme_argsZtheme_cache_dirZtheme_cache_pathe r!   D/var/www/html/stable-diffusion-webui/modules/shared_gradio_themes.pyreload_gradio_theme,   s&    r#   )N)
r   gradior   modulesr   r   modules.paths_internalr   Zgradio_hf_hub_themesr#   r!   r!   r!   r"   <module>   s
   "