Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,7 +117,7 @@ def add_gallery(image, model_str, gallery):
|
|
| 117 |
CSS="""
|
| 118 |
.gradio-container { max-width: 1200px; margin: 0 auto; !important; }
|
| 119 |
.output { width=112px; height=112px; max_width=112px; max_height=112px; !important; }
|
| 120 |
-
.gallery { min_width=512px; min_height=512px; max_height=
|
| 121 |
.guide { text-align: center; !important; }
|
| 122 |
"""
|
| 123 |
|
|
@@ -220,20 +220,19 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty', fill_width=True, css=CSS)
|
|
| 220 |
o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
|
| 221 |
#stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
|
| 222 |
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
demo.launch(show_api=False, max_threads=400)
|
|
|
|
| 117 |
CSS="""
|
| 118 |
.gradio-container { max-width: 1200px; margin: 0 auto; !important; }
|
| 119 |
.output { width=112px; height=112px; max_width=112px; max_height=112px; !important; }
|
| 120 |
+
.gallery { min_width=512px; min_height=512px; max_height=800px; !important; }
|
| 121 |
.guide { text-align: center; !important; }
|
| 122 |
"""
|
| 123 |
|
|
|
|
| 220 |
o.change(add_gallery, [o, model_choice2, gallery2], [gallery2])
|
| 221 |
#stop_button2.click(lambda: gr.update(interactive=False), None, stop_button2, cancels=[gen_event2])
|
| 222 |
|
| 223 |
+
makeItDark = """
|
| 224 |
+
function refresh() {
|
| 225 |
+
const url = new URL(window.location);
|
| 226 |
+
|
| 227 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
| 228 |
+
url.searchParams.set('__theme', 'dark');
|
| 229 |
+
window.location.href = url.href;
|
| 230 |
+
}
|
| 231 |
+
}
|
| 232 |
+
"""
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
gr.Markdown("<script>" + makeItDark + "</script>")
|
| 236 |
+
|
| 237 |
+
#demo.queue(default_concurrency_limit=200, max_size=200)
|
| 238 |
+
demo.launch(show_api=False, max_threads=400)
|
|
|