Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,6 +97,7 @@ def infer(prompt, neg, seed, rand, w, h, cfg, steps, scheduler_type,
|
|
| 97 |
|
| 98 |
# CSS 設定(ダークモード強制防止+カフェ風テーマ)
|
| 99 |
css = """
|
|
|
|
| 100 |
body {
|
| 101 |
background-color: #f4e1c1 !important;
|
| 102 |
font-family: 'Georgia', serif;
|
|
@@ -190,7 +191,7 @@ body.gradio-running #custom-loader { display: flex; }
|
|
| 190 |
}
|
| 191 |
"""
|
| 192 |
|
| 193 |
-
with gr.Blocks(css=css, theme=gr.themes.Default(font=[gr.themes.GoogleFont("Playpen
|
| 194 |
with gr.Column(elem_id="col-container"):
|
| 195 |
gr.HTML('<section class="nobackground"><h2>SDXL – Re:cocoamixXL3 (coamixXL3) Demo</h2><br>The log is shared with other.<br>Please use this model at your own risk. I am not responsible in any way for any problems with the generated images.</section>')
|
| 196 |
gr.HTML('<section class="nobackground"><a href="https://civitai.com/models/1553716?modelVersionId=1855218" target="_blank">Link: Civitai</a></section>')
|
|
@@ -277,6 +278,16 @@ window.addEventListener('load', () => {
|
|
| 277 |
inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
|
| 278 |
outputs=[img_out, history_gallery]
|
| 279 |
)
|
| 280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
demo.queue()
|
| 282 |
demo.launch()
|
|
|
|
| 97 |
|
| 98 |
# CSS 設定(ダークモード強制防止+カフェ風テーマ)
|
| 99 |
css = """
|
| 100 |
+
@import url('https://fonts.googleapis.com/css2?family=Playpen+Sans+Hebrew:wght@100;200;300;400;500;600;700;800&display=swap');
|
| 101 |
body {
|
| 102 |
background-color: #f4e1c1 !important;
|
| 103 |
font-family: 'Georgia', serif;
|
|
|
|
| 191 |
}
|
| 192 |
"""
|
| 193 |
|
| 194 |
+
with gr.Blocks(css=css, theme=gr.themes.Default(font=[gr.themes.GoogleFont("Playpen+Sans+Hebrew"), "Arial", "sans-serif"])) as demo:
|
| 195 |
with gr.Column(elem_id="col-container"):
|
| 196 |
gr.HTML('<section class="nobackground"><h2>SDXL – Re:cocoamixXL3 (coamixXL3) Demo</h2><br>The log is shared with other.<br>Please use this model at your own risk. I am not responsible in any way for any problems with the generated images.</section>')
|
| 197 |
gr.HTML('<section class="nobackground"><a href="https://civitai.com/models/1553716?modelVersionId=1855218" target="_blank">Link: Civitai</a></section>')
|
|
|
|
| 278 |
inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
|
| 279 |
outputs=[img_out, history_gallery]
|
| 280 |
)
|
| 281 |
+
|
| 282 |
+
# ページロード時に history から初期表示
|
| 283 |
+
demo.load(
|
| 284 |
+
fn=lambda: (
|
| 285 |
+
[(img, make_html_table(caption)) for img, caption in history],
|
| 286 |
+
"".join(f'<div style="margin-bottom:12px">{make_html_table(caption)}</div>' for _, caption in history)
|
| 287 |
+
),
|
| 288 |
+
inputs=[],
|
| 289 |
+
outputs=[history_gallery, history_tables]
|
| 290 |
+
)
|
| 291 |
+
|
| 292 |
demo.queue()
|
| 293 |
demo.launch()
|