Spaces:
Runtime error
Runtime error
Commit ·
09a2d4c
1
Parent(s): 5743af2
Remove 4th option
Browse files123456789106 unmodified lines171819202122232425262728293031323313 unmodified lines47484950515253545556575859import gradio as grnets=["hysts/ControlNet","fffiloni/ControlNet-Video","RamAnanth1/ControlNet","hysts/ControlNet-with-other-models",]width="100%"6 unmodified linesn=NetLink()def fn0():return gr.Accordion.update(label=f"{nets[0]}",visible=True),gr.Accordion.update(label=f"{nets[1]}",visible=False),gr.Accordion.update(label=f"{nets[2]}",visible=False),gr.Accordion.update(label=f"{nets[3]}",visible=False)def fn1():return gr.Accordion.update(label=f"{nets[0]}",visible=False),gr.Accordion.update(label=f"{nets[1]}",visible=True),gr.Accordion.update(label=f"{nets[2]}",visible=False),gr.Accordion.update(label=f"{nets[3]}",visible=False)def fn2():return gr.Accordion.update(label=f"{nets[0]}",visible=False),gr.Accordion.update(label=f"{nets[1]}",visible=False),gr.Accordion.update(label=f"{nets[2]}",visible=True),gr.Accordion.update(label=f"{nets[3]}",visible=False)def fn3():return gr.Accordion.update(label=f"{nets[0]}",visible=False),gr.Accordion.update(label=f"{nets[1]}",visible=False),gr.Accordion.update(label=f"{nets[2]}",visible=False),gr.Accordion.update(label=f"{nets[3]}",visible=True)with gr.Blocks(css="sauce.css") as control_app:gr.Markdown("""<center><h1>Control Net Collection</h1><center>""")gr.Markdown(f"""<center><h3>Find these AI Demos and more at <br><a href='https://hugggingface.co/spaces'>Huggingface Spaces</a></h3>""")with gr.Box():with gr.Row():13 unmodified lineswith gr.Accordion(label=f"{nets[2]}",visible=False) as a2:gr.Markdown(f"""<center><h5>Find this Space at <a href='https://huggingface.co/spaces/{nets[2]}'>{nets[2]}</a></h5>""")gr.HTML(f'''<center><iframe src="{n.change(nets[2])}" frameborder="0" width={width} height={height}></iframe><center>''')with gr.Accordion(label=f"{nets[3]}",visible=False) as a3:gr.Markdown(f"""<center><h5>Find this Space at <a href='https://huggingface.co/spaces/{nets[3]}'>{nets[3]}</a></h5>""")gr.HTML(f'''<center><iframe src="{n.change(nets[3])}" frameborder="0" width={width} height={height}></iframe><center>''')btn0.click(fn0,None,[a0,a1,a2,a3])btn1.click(fn1,None,[a0,a1,a2,a3])btn2.click(fn2,None,[a0,a1,a2,a3])btn3.click(fn3,None,[a0,a1,a2,a3])control_app.queue(concurrency_count=100).launch()1234567896 unmodified lines1617181920212223242526272829303113 unmodified lines454647484950515253import gradio as grnets=["fffiloni/Pix2Pix-Video","fffiloni/ControlNet-Video","fffiloni/x-decoder-video"]width="100%"6 unmodified linesn=NetLink()def fn0():return gr.Accordion.update(label=f"{nets[0]}",visible=True),gr.Accordion.update(label=f"{nets[1]}",visible=False),gr.Accordion.update(label=f"{nets[2]}",visible=False)def fn1():return gr.Accordion.update(label=f"{nets[0]}",visible=False),gr.Accordion.update(label=f"{nets[1]}",visible=True),gr.Accordion.update(label=f"{nets[2]}",visible=False)def fn2():return gr.Accordion.update(label=f"{nets[0]}",visible=False),gr.Accordion.update(label=f"{nets[1]}",visible=False),gr.Accordion.update(label=f"{nets[2]}",visible=True)with gr.Blocks(css="sauce.css") as control_app:gr.Markdown("""<center><h1>Video2Video Models Collection</h1><center>""")gr.Markdown(f"""<center><h3>Find these AI Demos and more at <br><a href='https://hugggingface.co/spaces'>Huggingface Spaces</a></h3>""")with gr.Box():with gr.Row():13 unmodified lineswith gr.Accordion(label=f"{nets[2]}",visible=False) as a2:gr.Markdown(f"""<center><h5>Find this Space at <a href='https://huggingface.co/spaces/{nets[2]}'>{nets[2]}</a></h5>""")gr.HTML(f'''<center><iframe src="{n.change(nets[2])}" frameborder="0" width={width} height={height}></iframe><center>''')btn0.click(fn0,None,[a0,a1,a2,a3])btn1.click(fn1,None,[a0,a1,a2,a3])btn2.click(fn2,None,[a0,a1,a2,a3])control_app.queue(concurrency_count=100).launch()
app.py+7-13