Spaces:
Runtime error
Runtime error
import gradio as gr | |
from Blur import background_motion_blur | |
def blur(img, distance_blur, amount_blur, amount_subject): | |
return background_motion_blur(img, distance_blur, amount_blur, amount_subject) | |
iface = gr.Interface(fn=blur, | |
title="Motion Blur", | |
description=""" | |
by [Tony Assi](https://www.tonyassi.com/) | |
A special motion blur where only the background is blurred and the subject is unaffected. [Github Repo](https://github.com/TonyAssi/Motion-Blur). Please β€οΈ this Space. | |
I build custom AI apps for companies. <a href="mailto: tony.assi.media@gmail.com">Email me</a> for business inquiries. | |
""", | |
inputs=[gr.Image(type='pil', label='Image'), | |
gr.Slider(label='Blur Distance', minimum=0, maximum=500, value=100), | |
gr.Slider(label='Blur Amount', minimum=0.0, maximum=1.0, value=0.75), | |
gr.Slider(label='Subject Amount', minimum=0.0, maximum=1.0, value=1.0)], | |
outputs=gr.Image(label='Output'), | |
theme = gr.themes.Base(primary_hue="teal",secondary_hue="teal",neutral_hue="slate"), | |
examples=[['./image.png', 100, 0.75, 1.0]]) | |
iface.launch() |