File size: 1,605 Bytes
d7b9c73 b0775ad 1f3941c d7b9c73 165e725 d7b9c73 165e725 d7b9c73 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import gradio as gr
from magic_mix import magic_mix
iface = gr.Interface(
description = """<p>Implementation demo of <a href='https://arxiv.org/abs/2210.16056' target='_blank'>MagicMix: Semantic Mixing with Diffusion Models</a> paper. Check out the <a href='https://github.com/daspartho/MagicMix' target='_blank'>Github repo</a> for the implementation details.</p>
<p><a href="https://huggingface.co./spaces/daspartho/MagicMix?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>""",
fn=magic_mix,
inputs=[
gr.Image(shape=(512,512), type="pil"),
gr.Text(),
gr.Slider(value=0.3,minimum=0, maximum=1, step=0.1),
gr.Slider(value=0.6,minimum=0, maximum=1, step=0.1),
gr.Slider(value=0.5,minimum=0, maximum=1, step=0.1),
gr.Number(value=42, maximum=2**64-1),
gr.Slider(value=50),
gr.Slider(value=7.5, minimum=1, maximum=15, step=0.1),
],
outputs=gr.Image(),
title="MagicMix",
examples=[["phone.jpg","bed",0.3,0.5,0.5,42,50,7.5]]
)
iface.launch() |