Spaces:
Sleeping
Sleeping
半手動
Browse files
app.py
CHANGED
|
@@ -89,7 +89,8 @@ def infer(prompt, neg, seed, rand, w, h, cfg, steps, scheduler_type, progress=gr
|
|
| 89 |
progress(1.0, desc="Done!")
|
| 90 |
|
| 91 |
gallery_items = [(item[0], make_html_table(item[1])) for item in history]
|
| 92 |
-
|
|
|
|
| 93 |
|
| 94 |
# CSS 設定(ダークモード強制防止+カフェ風テーマ)
|
| 95 |
css = """
|
|
@@ -179,9 +180,8 @@ body.gradio-running #custom-loader { display: flex; }
|
|
| 179 |
|
| 180 |
with gr.Blocks(css=css) as demo:
|
| 181 |
with gr.Column(elem_id="col-container"):
|
| 182 |
-
|
| 183 |
-
gr.
|
| 184 |
-
gr.Markdown('<section class="nobackground">[Link: Civitai](https://civitai.com/models/1553716?modelVersionId=1855218)</section>')
|
| 185 |
|
| 186 |
with gr.Row():
|
| 187 |
prompt = gr.Textbox(lines=1, placeholder="Prompt…", value="1girl, cocoart, masterpiece, anime,", label="Prompt")
|
|
@@ -229,11 +229,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 229 |
interactive=True,
|
| 230 |
type="auto"
|
| 231 |
)
|
|
|
|
|
|
|
| 232 |
|
| 233 |
run.click(
|
| 234 |
fn=infer,
|
| 235 |
inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
|
| 236 |
-
outputs=[img_out, history_gallery]
|
| 237 |
)
|
| 238 |
|
| 239 |
demo.queue()
|
|
|
|
| 89 |
progress(1.0, desc="Done!")
|
| 90 |
|
| 91 |
gallery_items = [(item[0], make_html_table(item[1])) for item in history]
|
| 92 |
+
tables_html = "".join(f'<div style="margin-bottom:12px">{make_html_table(item[1])}</div>' for item in history)
|
| 93 |
+
return img, gallery_items, tables_html
|
| 94 |
|
| 95 |
# CSS 設定(ダークモード強制防止+カフェ風テーマ)
|
| 96 |
css = """
|
|
|
|
| 180 |
|
| 181 |
with gr.Blocks(css=css) as demo:
|
| 182 |
with gr.Column(elem_id="col-container"):
|
| 183 |
+
gr.HTML('<section class="nobackground"><h2>SDXL Base – cocoamixXL3 Demo</h2></section>')
|
| 184 |
+
gr.HTML('<section class="nobackground"><a href="https://civitai.com/models/1553716?modelVersionId=1855218" target="_blank">Link: Civitai</a></section>')
|
|
|
|
| 185 |
|
| 186 |
with gr.Row():
|
| 187 |
prompt = gr.Textbox(lines=1, placeholder="Prompt…", value="1girl, cocoart, masterpiece, anime,", label="Prompt")
|
|
|
|
| 229 |
interactive=True,
|
| 230 |
type="auto"
|
| 231 |
)
|
| 232 |
+
# テーブル部分だけを下にまとめて生HTMLレンダー
|
| 233 |
+
history_tables = gr.HTML()
|
| 234 |
|
| 235 |
run.click(
|
| 236 |
fn=infer,
|
| 237 |
inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
|
| 238 |
+
outputs=[img_out, history_gallery, history_tables]
|
| 239 |
)
|
| 240 |
|
| 241 |
demo.queue()
|