RamAnanth1 commited on
Commit
09a2d4c
·
1 Parent(s): 5743af2

Remove 4th option

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -1,10 +1,9 @@
1
  import gradio as gr
2
 
3
  nets=[
4
- "hysts/ControlNet",
5
  "fffiloni/ControlNet-Video",
6
- "RamAnanth1/ControlNet",
7
- "hysts/ControlNet-with-other-models",
8
  ]
9
 
10
  width="100%"
@@ -17,17 +16,16 @@ class NetLink:
17
  n=NetLink()
18
 
19
  def fn0():
20
- 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)
21
  def fn1():
22
- 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)
23
  def fn2():
24
- 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)
25
- def fn3():
26
- 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)
27
 
28
 
29
  with gr.Blocks(css="sauce.css") as control_app:
30
- gr.Markdown("""<center><h1>Control Net Collection</h1><center>""")
31
  gr.Markdown(f"""<center><h3>Find these AI Demos and more at <br><a href='https://hugggingface.co/spaces'>Huggingface Spaces</a></h3>""")
32
  with gr.Box():
33
  with gr.Row():
@@ -47,13 +45,9 @@ with gr.Blocks(css="sauce.css") as control_app:
47
  with gr.Accordion(label=f"{nets[2]}",visible=False) as a2:
48
  gr.Markdown(f"""<center><h5>Find this Space at <a href='https://huggingface.co/spaces/{nets[2]}'>{nets[2]}</a></h5>""")
49
  gr.HTML(f'''<center><iframe src="{n.change(nets[2])}" frameborder="0" width={width} height={height}></iframe><center>''')
50
- with gr.Accordion(label=f"{nets[3]}",visible=False) as a3:
51
- gr.Markdown(f"""<center><h5>Find this Space at <a href='https://huggingface.co/spaces/{nets[3]}'>{nets[3]}</a></h5>""")
52
- gr.HTML(f'''<center><iframe src="{n.change(nets[3])}" frameborder="0" width={width} height={height}></iframe><center>''')
53
 
54
  btn0.click(fn0,None,[a0,a1,a2,a3])
55
  btn1.click(fn1,None,[a0,a1,a2,a3])
56
  btn2.click(fn2,None,[a0,a1,a2,a3])
57
- btn3.click(fn3,None,[a0,a1,a2,a3])
58
 
59
  control_app.queue(concurrency_count=100).launch()
 
1
  import gradio as gr
2
 
3
  nets=[
4
+ "fffiloni/Pix2Pix-Video",
5
  "fffiloni/ControlNet-Video",
6
+ "fffiloni/x-decoder-video"
 
7
  ]
8
 
9
  width="100%"
 
16
  n=NetLink()
17
 
18
  def fn0():
19
+ 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)
20
  def fn1():
21
+ 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)
22
  def fn2():
23
+ 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)
24
+
 
25
 
26
 
27
  with gr.Blocks(css="sauce.css") as control_app:
28
+ gr.Markdown("""<center><h1>Video2Video Models Collection</h1><center>""")
29
  gr.Markdown(f"""<center><h3>Find these AI Demos and more at <br><a href='https://hugggingface.co/spaces'>Huggingface Spaces</a></h3>""")
30
  with gr.Box():
31
  with gr.Row():
 
45
  with gr.Accordion(label=f"{nets[2]}",visible=False) as a2:
46
  gr.Markdown(f"""<center><h5>Find this Space at <a href='https://huggingface.co/spaces/{nets[2]}'>{nets[2]}</a></h5>""")
47
  gr.HTML(f'''<center><iframe src="{n.change(nets[2])}" frameborder="0" width={width} height={height}></iframe><center>''')
 
 
 
48
 
49
  btn0.click(fn0,None,[a0,a1,a2,a3])
50
  btn1.click(fn1,None,[a0,a1,a2,a3])
51
  btn2.click(fn2,None,[a0,a1,a2,a3])
 
52
 
53
  control_app.queue(concurrency_count=100).launch()