Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,6 +42,7 @@ history = []
|
|
| 42 |
def make_html_table(caption):
|
| 43 |
rows = caption.split("\n")
|
| 44 |
# html = '<table style="width:100%;border-collapse:collapse;background:#fffaf1;color:#000">'
|
|
|
|
| 45 |
for row in rows:
|
| 46 |
if ": " in row:
|
| 47 |
key, val = row.split(": ", 1)
|
|
@@ -134,11 +135,11 @@ html, .gradio-container, .dark, .dark * {
|
|
| 134 |
}
|
| 135 |
.gradio-spinner { display: none !important; }
|
| 136 |
#custom-loader {
|
| 137 |
-
display: none;
|
| 138 |
align-items: center;
|
| 139 |
justify-content: center;
|
| 140 |
font-weight: bold;
|
| 141 |
margin: 12px 0;
|
|
|
|
| 142 |
}
|
| 143 |
.block.svelte-11xb1hd {
|
| 144 |
background: #efd1bf !important;
|
|
@@ -253,7 +254,17 @@ with gr.Blocks(css=css, theme=gr.themes.Default(font=[gr.themes.GoogleFont("maki
|
|
| 253 |
run.click(
|
| 254 |
fn=infer,
|
| 255 |
inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
|
| 256 |
-
outputs=[img_out
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
)
|
| 258 |
|
| 259 |
demo.queue()
|
|
|
|
| 42 |
def make_html_table(caption):
|
| 43 |
rows = caption.split("\n")
|
| 44 |
# html = '<table style="width:100%;border-collapse:collapse;background:#fffaf1;color:#000">'
|
| 45 |
+
html = ''
|
| 46 |
for row in rows:
|
| 47 |
if ": " in row:
|
| 48 |
key, val = row.split(": ", 1)
|
|
|
|
| 135 |
}
|
| 136 |
.gradio-spinner { display: none !important; }
|
| 137 |
#custom-loader {
|
|
|
|
| 138 |
align-items: center;
|
| 139 |
justify-content: center;
|
| 140 |
font-weight: bold;
|
| 141 |
margin: 12px 0;
|
| 142 |
+
position: fixed; z-index: 9999
|
| 143 |
}
|
| 144 |
.block.svelte-11xb1hd {
|
| 145 |
background: #efd1bf !important;
|
|
|
|
| 254 |
run.click(
|
| 255 |
fn=infer,
|
| 256 |
inputs=[prompt, neg, seed_sl, rand, width, height, cfg, steps, scheduler_type],
|
| 257 |
+
outputs=[img_out]
|
| 258 |
+
)
|
| 259 |
+
|
| 260 |
+
def add_to_history(img):
|
| 261 |
+
history.insert(0, img)
|
| 262 |
+
return history
|
| 263 |
+
|
| 264 |
+
run.click(
|
| 265 |
+
fn=add_to_history,
|
| 266 |
+
inputs=[img_out],
|
| 267 |
+
outputs=[history_gallery]
|
| 268 |
)
|
| 269 |
|
| 270 |
demo.queue()
|