Spaces:
Running
Running
Upload 3 files
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π»π·οΈπ
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
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:
|