menghanxia commited on
Commit
7d153b0
β€’
1 Parent(s): be9102f
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -39,7 +39,7 @@ def switch_states(is_checked):
39
  demo = gr.Blocks(title="DISCO")
40
  with demo:
41
  gr.Markdown(value="""
42
- **Gradio demo for DISCO: Disentangled Image Colorization via Global Anchors**. Check our [project page](https://menghanxia.github.io/projects/disco.html).
43
  """)
44
  with gr.Row():
45
  with gr.Column():
@@ -64,20 +64,21 @@ with demo:
64
 
65
  ## guiline
66
  gr.Markdown(value="""
67
- **Guideline**
68
- 1. upload your image or select one from the examplesπŸ˜›;
69
- 2. set up the arguments: "Num. of anchors" and "Colorization resolution";
70
- 3. run the colorization (two modes supported):
71
- - *Automatic mode*: click "Colorize" to get the automatically colorized output.
72
- - *Editable mode*: check ""Show editable anchors" and click "Predict anchors". Then, modify the colors of the predicted anchors (only anchor region will be used). Finally, click "Colorize" to get the result.
73
  """)
74
- gr.Examples(examples=[
75
- ['01.jpg', 8, "Low (256x256)"],
76
- ['02.jpg', 8, "Low (256x256)"],
77
- ['03.jpg', 8, "Low (256x256)"],
78
- ['04.jpg', 8, "Low (256x256)"],
79
- ],
80
- inputs=[Image_input,Num_anchor,Radio_resolution], outputs=[Image_output], label="Examples")
 
81
  gr.HTML(value="""
82
  <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>
83
  """)
 
39
  demo = gr.Blocks(title="DISCO")
40
  with demo:
41
  gr.Markdown(value="""
42
+ **Gradio demo for DISCO: Disentangled Image Colorization via Global Anchors**. Check our [project page](https://menghanxia.github.io/projects/disco.html) πŸ˜›.
43
  """)
44
  with gr.Row():
45
  with gr.Column():
 
64
 
65
  ## guiline
66
  gr.Markdown(value="""
67
+ πŸ””**Guideline**
68
+ 1. Upload your image or select one from the examples.
69
+ 2. Set up the arguments: "Num. of anchors" and "Colorization resolution".
70
+ 3. Run the colorization (two modes supported):
71
+ - πŸ“€Automatic mode: **Click** "Colorize" to get the automatically colorized output.
72
+ - ✏️Editable mode: **Check** ""Show editable anchors"; **Click** "Predict anchors"; **Redraw** the anchor colors (only anchor region will be used); **Click** "Colorize" to get the result.
73
  """)
74
+ if RUN_MODE != "local":
75
+ gr.Examples(examples=[
76
+ ['01.jpg', 8, "Low (256x256)"],
77
+ ['02.jpg', 8, "Low (256x256)"],
78
+ ['03.jpg', 8, "Low (256x256)"],
79
+ ['04.jpg', 8, "Low (256x256)"],
80
+ ],
81
+ inputs=[Image_input,Num_anchor,Radio_resolution], outputs=[Image_output], label="Examples")
82
  gr.HTML(value="""
83
  <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>
84
  """)