image-blender / app.py
tonyassi's picture
Update app.py
c2b1670 verified
raw
history blame
622 Bytes
import gradio as gr
def blend(img1, img2, slider):
return img1
with gr.Blocks() as demo:
gr.Markdown("""
# Image Blender
by [Tony Assi](https://www.tonyassi.com/)
""")
with gr.Row():
with gr.Column():
img1 = gr.Image(label='Image 1', type='filepath')
img2 = gr.Image(label='Image 2',type='filepath')
slider = gr.Slider()
btn = gr.Button("Blend")
with gr.Column():
output = gr.Image(label='Result', maximum=1.0, value=0.5)
btn.click(fn=blend, inputs=[img1, img2, slider], outputs=output)
demo.launch()