mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 15:13:38 +00:00
Several small code simplifications
This commit is contained in:
parent
0466b6e271
commit
6382fbef83
9 changed files with 140 additions and 235 deletions
|
|
@ -191,21 +191,19 @@ def _apply_custom_generate_reply():
|
|||
|
||||
|
||||
def _apply_custom_css():
|
||||
all_css = ''
|
||||
for extension, _ in iterator():
|
||||
if hasattr(extension, 'custom_css'):
|
||||
all_css += getattr(extension, 'custom_css')()
|
||||
|
||||
return all_css
|
||||
return ''.join(
|
||||
getattr(extension, 'custom_css')()
|
||||
for extension, _ in iterator()
|
||||
if hasattr(extension, 'custom_css')
|
||||
)
|
||||
|
||||
|
||||
def _apply_custom_js():
|
||||
all_js = ''
|
||||
for extension, _ in iterator():
|
||||
if hasattr(extension, 'custom_js'):
|
||||
all_js += getattr(extension, 'custom_js')()
|
||||
|
||||
return all_js
|
||||
return ''.join(
|
||||
getattr(extension, 'custom_js')()
|
||||
for extension, _ in iterator()
|
||||
if hasattr(extension, 'custom_js')
|
||||
)
|
||||
|
||||
|
||||
def create_extensions_block():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue