import gradio as gr nets=[ "fffiloni/Pix2Pix-Video", "fffiloni/ControlNet-Video", "fffiloni/x-decoder-video" ] width="100%" height="2500" class NetLink: x="" def change(self,link): ch = link.replace("/","-").replace("_","-") return f"https://{ch}.hf.space" n=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("""

Video2Video Models Collection

""") gr.Markdown(f"""

Find these AI Demos and more at
Huggingface Spaces

""") with gr.Box(): with gr.Row(): with gr.Column(): btn0 = gr.Button(f'{nets[0]}') btn1 = gr.Button(f'{nets[1]}') btn2 = gr.Button(f'{nets[2]}') with gr.Accordion(label=f"{nets[0]}",visible=True) as a0: gr.Markdown(f"""
Find this Space at {nets[0]}
""") gr.HTML(f'''
''') with gr.Accordion(label=f"{nets[1]}",visible=False) as a1: gr.Markdown(f"""
Find this Space at {nets[1]}
""") gr.HTML(f'''
''') with gr.Accordion(label=f"{nets[2]}",visible=False) as a2: gr.Markdown(f"""
Find this Space at {nets[2]}
""") gr.HTML(f'''
''') btn0.click(fn0,None,[a0,a1,a2]) btn1.click(fn1,None,[a0,a1,a2]) btn2.click(fn2,None,[a0,a1,a2]) control_app.queue(concurrency_count=100).launch()