Spaces:
Running
Running
change color only
Browse files- README.md +2 -1
- app.py +3 -3
- demo_header.html +7 -5
- tools.html +3 -3
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: π
|
4 |
colorFrom: indigo
|
5 |
colorTo: gray
|
@@ -8,6 +8,7 @@ sdk_version: 5.5.0
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: Gradio Fixed Paint
|
3 |
emoji: π
|
4 |
colorFrom: indigo
|
5 |
colorTo: gray
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
+
short_description: one of solution for broken image-editor
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
@@ -61,9 +61,9 @@ css="""
|
|
61 |
}
|
62 |
"""
|
63 |
|
64 |
-
def color_changed(color
|
65 |
#mode must be RGBA
|
66 |
-
editor = gr.ImageEditor(
|
67 |
return editor
|
68 |
|
69 |
with gr.Blocks(css=css, elem_id="demo-container") as demo:
|
@@ -75,7 +75,7 @@ with gr.Blocks(css=css, elem_id="demo-container") as demo:
|
|
75 |
#mode must be RGBA
|
76 |
image = gr.ImageEditor(height=800,sources=['upload','clipboard'],transforms=[],image_mode='RGBA', layers=False, elem_id="Foreground", type="pil", label="Foreground",brush=gr.Brush(colors=["#888"], color_mode="fixed"))
|
77 |
pick=gr.ColorPicker(label="color",value="#888",info="ImageEditor color is broken,pick color from here.reselect paint-tool and draw.")
|
78 |
-
pick.change(fn=color_changed,inputs=[pick
|
79 |
|
80 |
|
81 |
btn = gr.Button("Apply Paint", elem_id="run_button",variant="primary")
|
|
|
61 |
}
|
62 |
"""
|
63 |
|
64 |
+
def color_changed(color):
|
65 |
#mode must be RGBA
|
66 |
+
editor = gr.ImageEditor(brush=gr.Brush(colors=[color],color_mode="fixed"))
|
67 |
return editor
|
68 |
|
69 |
with gr.Blocks(css=css, elem_id="demo-container") as demo:
|
|
|
75 |
#mode must be RGBA
|
76 |
image = gr.ImageEditor(height=800,sources=['upload','clipboard'],transforms=[],image_mode='RGBA', layers=False, elem_id="Foreground", type="pil", label="Foreground",brush=gr.Brush(colors=["#888"], color_mode="fixed"))
|
77 |
pick=gr.ColorPicker(label="color",value="#888",info="ImageEditor color is broken,pick color from here.reselect paint-tool and draw.")
|
78 |
+
pick.change(fn=color_changed,inputs=[pick],outputs=[image])
|
79 |
|
80 |
|
81 |
btn = gr.Button("Apply Paint", elem_id="run_button",variant="primary")
|
demo_header.html
CHANGED
@@ -1,16 +1,18 @@
|
|
1 |
<div style="text-align: center;">
|
2 |
<h1>
|
3 |
-
|
4 |
</h1>
|
5 |
<div class="grid-container">
|
6 |
<img src="https://akjava.github.io/AIDiagramChatWithVoice-FaceCharacter/webp/128/00031245_08_00006200.webp" alt="Flux.1-schnell-WebP3Frame-TalkingAnimation" class="image">
|
7 |
<p class="text">
|
8 |
-
|
9 |
-
WARNING:sometime
|
10 |
-
Good for classic inpaint border
|
11 |
Paintng good at adding accessories with Flux, using inpainting/img2img, but not great at faces or bodies(only close eyes seems work)<br>
|
12 |
-
This is one of My solution for gradio5.
|
13 |
the BUG is <a href="https://github.com/gradio-app/gradio/issues/9066">this</a>.I hope it will fix soon<br>
|
|
|
|
|
14 |
</p>
|
15 |
</div>
|
16 |
</div>
|
|
|
1 |
<div style="text-align: center;">
|
2 |
<h1>
|
3 |
+
Gradio550 Paint
|
4 |
</h1>
|
5 |
<div class="grid-container">
|
6 |
<img src="https://akjava.github.io/AIDiagramChatWithVoice-FaceCharacter/webp/128/00031245_08_00006200.webp" alt="Flux.1-schnell-WebP3Frame-TalkingAnimation" class="image">
|
7 |
<p class="text">
|
8 |
+
<br>
|
9 |
+
WARNING:sometime unstable,you can't draw true black(0,0,0)<br>
|
10 |
+
Good for classic inpaint border.<br>
|
11 |
Paintng good at adding accessories with Flux, using inpainting/img2img, but not great at faces or bodies(only close eyes seems work)<br>
|
12 |
+
This is one of My solution for gradio5.5 painting,I dont't know which old version gradio paint work.<br>
|
13 |
the BUG is <a href="https://github.com/gradio-app/gradio/issues/9066">this</a>.I hope it will fix soon<br>
|
14 |
+
another solution is not use gradio for paint <a href="https://huggingface.co/spaces/Akjava/godot-web-gradio-inapint">Godot-web-gradio-inpaint</a><br>
|
15 |
+
|
16 |
</p>
|
17 |
</div>
|
18 |
</div>
|
tools.html
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<div style="text-align: center;">
|
2 |
-
<p><a href="https://huggingface.co/spaces/Akjava/
|
3 |
-
<p><a href="https://huggingface.co/spaces/Akjava/WebPTalkHead">[WebP-3F-TH]</a>
|
|
|
4 |
<a href="https://huggingface.co/spaces/Akjava/flux1-schnell-mask-inpaint">[Flux1-Inpaint(GPU)]</a>
|
5 |
<a href="https://huggingface.co/spaces/Akjava/OpenCVInpaintCPU">[OpenCV-Inapint]</a>
|
6 |
<a href="https://huggingface.co/spaces/Akjava/Simple-Whitebalance-Image">[Whitebalance]</a>
|
7 |
<a href="https://huggingface.co/spaces/Akjava/Simple-Mask-Paste-Image">[Paste Image]</a>
|
8 |
-
<a href="https://huggingface.co/spaces/Akjava/gradio540-tmp-paint">[Paint Image(Alpha)]</a>
|
9 |
<a href=" https://huggingface.co/spaces/Akjava/WebP-Resize-Convert">[WebP Resize Convert]</a></p>
|
10 |
</div>
|
|
|
1 |
<div style="text-align: center;">
|
2 |
+
<p><a href="https://huggingface.co/spaces/Akjava/AIDiagramChatWithVoice-FaceCharacter">AI Diagram Chat with Voice/Face Character Making Tools</a></p>
|
3 |
+
<p><a href="https://huggingface.co/spaces/Akjava/WebPTalkHead">[WebP-3F-TH]</a>
|
4 |
+
<a href="https://huggingface.co/spaces/Akjava/flux1-schnell-img2img">[Flux1-Img2Img(GPU)]</a>
|
5 |
<a href="https://huggingface.co/spaces/Akjava/flux1-schnell-mask-inpaint">[Flux1-Inpaint(GPU)]</a>
|
6 |
<a href="https://huggingface.co/spaces/Akjava/OpenCVInpaintCPU">[OpenCV-Inapint]</a>
|
7 |
<a href="https://huggingface.co/spaces/Akjava/Simple-Whitebalance-Image">[Whitebalance]</a>
|
8 |
<a href="https://huggingface.co/spaces/Akjava/Simple-Mask-Paste-Image">[Paste Image]</a>
|
|
|
9 |
<a href=" https://huggingface.co/spaces/Akjava/WebP-Resize-Convert">[WebP Resize Convert]</a></p>
|
10 |
</div>
|