Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def switch_states(is_checked):
|
|
37 |
else:
|
38 |
return gr.Image.update(visible=False), gr.Button.update(visible=False)
|
39 |
|
40 |
-
demo = gr.Blocks(title="DISCO")
|
41 |
with demo:
|
42 |
gr.Markdown(value="""
|
43 |
**Gradio demo for DISCO: Disentangled Image Colorization via Global Anchors**. Check our [project page](https://menghanxia.github.io/projects/disco.html) 😛.
|
@@ -79,7 +79,7 @@ with demo:
|
|
79 |
['03.jpg', 8, "Low (256x256)"],
|
80 |
['04.jpg', 8, "Low (256x256)"],
|
81 |
],
|
82 |
-
inputs=[Image_input,Num_anchor,Radio_resolution], outputs=[Image_output], label="Examples",
|
83 |
gr.HTML(value="""
|
84 |
<p style="text-align:center; color:orange"><a href='https://menghanxia.github.io/projects/disco.html' target='_blank'>DISCO Project Page</a> | <a href='https://github.com/MenghanXia/DisentangledColorization' target='_blank'>Github Repo</a></p>
|
85 |
""")
|
@@ -87,5 +87,6 @@ with demo:
|
|
87 |
if RUN_MODE == "local":
|
88 |
demo.launch(server_name='9.134.253.83',server_port=7788)
|
89 |
else:
|
90 |
-
demo.queue(
|
91 |
-
demo.launch()
|
|
|
|
37 |
else:
|
38 |
return gr.Image.update(visible=False), gr.Button.update(visible=False)
|
39 |
|
40 |
+
demo = gr.Blocks(title="DISCO", delete_cache=(1800, 3600),)
|
41 |
with demo:
|
42 |
gr.Markdown(value="""
|
43 |
**Gradio demo for DISCO: Disentangled Image Colorization via Global Anchors**. Check our [project page](https://menghanxia.github.io/projects/disco.html) 😛.
|
|
|
79 |
['03.jpg', 8, "Low (256x256)"],
|
80 |
['04.jpg', 8, "Low (256x256)"],
|
81 |
],
|
82 |
+
inputs=[Image_input,Num_anchor,Radio_resolution], outputs=[Image_output], label="Examples", cache_mode="lazy",)
|
83 |
gr.HTML(value="""
|
84 |
<p style="text-align:center; color:orange"><a href='https://menghanxia.github.io/projects/disco.html' target='_blank'>DISCO Project Page</a> | <a href='https://github.com/MenghanXia/DisentangledColorization' target='_blank'>Github Repo</a></p>
|
85 |
""")
|
|
|
87 |
if RUN_MODE == "local":
|
88 |
demo.launch(server_name='9.134.253.83',server_port=7788)
|
89 |
else:
|
90 |
+
demo.queue()
|
91 |
+
demo.launch(show_error=True)
|
92 |
+
|