Spaces:
Build error
Build error
NikeZoldyck
commited on
Commit
·
21ddb3c
1
Parent(s):
a53655b
Remove the foreground auto style
Browse files- app.py +6 -6
- utils/shared_utils.py +1 -1
app.py
CHANGED
@@ -173,10 +173,10 @@ with demo:
|
|
173 |
gr.Markdown(style_message)
|
174 |
#img_choice = gr.Radio(choices= ["yes"],interactive=True,type='value')
|
175 |
ref_img = gr.Image(shape=(800, 800),label="Style Reference", type="pil",interactive=True)
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
ref_btn.click(fn=styleimpose, inputs=[final_input_img, ref_img], outputs=[ref_img2])
|
180 |
|
181 |
with gr.Column(scale=1):
|
182 |
style_btn = gr.Button("Composition-Transfer",variant="primary")
|
@@ -186,8 +186,8 @@ with demo:
|
|
186 |
submit_btn = gr.Button("Smoothen",variant="primary")
|
187 |
output_img = gr.Image(shape=(800, 800),label="FinalSmoothened Image",type="pil")
|
188 |
|
189 |
-
supimp_btn.click(fn=st.superimpose, inputs=[final_input_img, final_back_img], outputs=[overlay_img
|
190 |
-
style_btn.click(fn=st.style_transfer, inputs=[overlay_img,
|
191 |
submit_btn.click(fn=st.smoother, inputs=[style_img,overlay_img], outputs=[output_img])
|
192 |
|
193 |
|
|
|
173 |
gr.Markdown(style_message)
|
174 |
#img_choice = gr.Radio(choices= ["yes"],interactive=True,type='value')
|
175 |
ref_img = gr.Image(shape=(800, 800),label="Style Reference", type="pil",interactive=True)
|
176 |
+
# ref_img2 = gr.Image(shape=(800, 800), label="Style Reference", type="pil", interactive=True, visible=False)
|
177 |
+
# ref_btn = gr.Button("Use this style",variant="primary")
|
178 |
+
#
|
179 |
+
# ref_btn.click(fn=styleimpose, inputs=[final_input_img, ref_img], outputs=[ref_img2])
|
180 |
|
181 |
with gr.Column(scale=1):
|
182 |
style_btn = gr.Button("Composition-Transfer",variant="primary")
|
|
|
186 |
submit_btn = gr.Button("Smoothen",variant="primary")
|
187 |
output_img = gr.Image(shape=(800, 800),label="FinalSmoothened Image",type="pil")
|
188 |
|
189 |
+
supimp_btn.click(fn=st.superimpose, inputs=[final_input_img, final_back_img], outputs=[overlay_img])
|
190 |
+
style_btn.click(fn=st.style_transfer, inputs=[overlay_img,ref_img], outputs=[style_img])
|
191 |
submit_btn.click(fn=st.smoother, inputs=[style_img,overlay_img], outputs=[output_img])
|
192 |
|
193 |
|
utils/shared_utils.py
CHANGED
@@ -81,7 +81,7 @@ def memory_limit_image_resize(cont_img):
|
|
81 |
def superimpose(input_img,back_img):
|
82 |
matte_img = remove(input_img)
|
83 |
back_img.paste(matte_img, (0, 0), matte_img)
|
84 |
-
return back_img
|
85 |
|
86 |
|
87 |
|
|
|
81 |
def superimpose(input_img,back_img):
|
82 |
matte_img = remove(input_img)
|
83 |
back_img.paste(matte_img, (0, 0), matte_img)
|
84 |
+
return back_img
|
85 |
|
86 |
|
87 |
|