Fix the gallery extension (#6656)

This commit is contained in:
Lounger 2025-01-12 03:35:22 +01:00 committed by GitHub
parent a0492ce325
commit ed16374ece
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,10 +93,11 @@ def generate_html():
def filter_cards(filter_str=''):
if filter_str == '':
return cards
return gr.Dataset(samples=cards)
filter_upper = filter_str.upper()
return [k for k in cards if filter_upper in k[1].upper()]
filtered = [k for k in cards if filter_upper in k[1].upper()]
return gr.Dataset(samples=filtered)
def select_character(evt: gr.SelectData):