John6666 commited on
Commit
e23e556
Β·
verified Β·
1 Parent(s): 56a1efa

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +2 -2
  3. ctag.py +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ˜»πŸ·οΈπŸ”
4
  colorFrom: indigo
5
  colorTo: pink
6
  sdk: gradio
7
- sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
  ---
 
4
  colorFrom: indigo
5
  colorTo: pink
6
  sdk: gradio
7
+ sdk_version: 5.12.0
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py CHANGED
@@ -7,7 +7,7 @@ CSS = """
7
  img[src*="#center"] { display: block; margin: auto; }
8
  """
9
 
10
- with gr.Blocks(fill_width=True, css=CSS) as app:
11
  gr.Markdown("## πŸ” Text Search for Animagine / Illustrious / NoobAI XL tag characters", elem_classes="title")
12
  with gr.Column():
13
  with gr.Group():
@@ -26,4 +26,4 @@ with gr.Blocks(fill_width=True, css=CSS) as app:
26
  inputs=[search_input, search_model], outputs=[search_output], trigger_mode="always_last")
27
  search_output.select(on_select_df, [search_output, search_detail], [search_tag, search_md])
28
 
29
- app.launch()
 
7
  img[src*="#center"] { display: block; margin: auto; }
8
  """
9
 
10
+ with gr.Blocks(theme='NoCrypt/miku@>=1.2.2', fill_width=True, css=CSS) as app:
11
  gr.Markdown("## πŸ” Text Search for Animagine / Illustrious / NoobAI XL tag characters", elem_classes="title")
12
  with gr.Column():
13
  with gr.Group():
 
26
  inputs=[search_input, search_model], outputs=[search_output], trigger_mode="always_last")
27
  search_output.select(on_select_df, [search_output, search_detail], [search_tag, search_md])
28
 
29
+ app.launch(ssr_mode=False)
ctag.py CHANGED
@@ -121,7 +121,7 @@ def search_char_dict(q: str, models: list[str], progress=gr.Progress(track_tqdm=
121
  if q.strip():
122
  #search_results = df[df["Character"].str.contains(to_roman(q).lower(), regex=False, na=False) & df["Character"].str.contains("(?: \\(" + "\\))|(?: \\(".join(models) + "\\))", regex=True, na=False)]
123
  l = char_df["Character"].tolist()
124
- rq = to_roman(q)
125
  mt = tuple([f" ({s})" for s in models])
126
  search_results = pd.DataFrame({"Character": [s for s in l if rq in s and s.endswith(mt)]})
127
  else:
 
121
  if q.strip():
122
  #search_results = df[df["Character"].str.contains(to_roman(q).lower(), regex=False, na=False) & df["Character"].str.contains("(?: \\(" + "\\))|(?: \\(".join(models) + "\\))", regex=True, na=False)]
123
  l = char_df["Character"].tolist()
124
+ rq = to_roman(q).lower()
125
  mt = tuple([f" ({s})" for s in models])
126
  search_results = pd.DataFrame({"Character": [s for s in l if rq in s and s.endswith(mt)]})
127
  else: