ccchenzc commited on
Commit
0fa3943
·
verified ·
1 Parent(s): ebd5c01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -38
app.py CHANGED
@@ -1,38 +1,38 @@
1
- import gradio as gr
2
- from webui import (
3
- create_interface_texture_synthesis,
4
- create_interface_style_t2i,
5
- create_interface_style_transfer,
6
- Runner
7
- )
8
-
9
-
10
-
11
-
12
- def main():
13
- runner = Runner()
14
-
15
- with gr.Blocks(analytics_enabled=False,
16
- title='Attention Distillation',
17
- ) as demo:
18
-
19
- md_txt = "# Attention Distillation" \
20
- "\nOfficial demo of the paper [Attention Distillation: A Unified Approach to Visual Characteristics Transfer](https://arxiv.org/abs/2502.20235)"
21
- gr.Markdown(md_txt)
22
-
23
- with gr.Tabs(selected='tab_style_transfer'):
24
- with gr.TabItem("Style Transfer", id='tab_style_transfer'):
25
- create_interface_style_transfer(runner=runner)
26
-
27
- with gr.TabItem("Style-Specific Text-to-Image Generation", id='tab_style_t2i'):
28
- create_interface_style_t2i(runner=runner)
29
-
30
- with gr.TabItem("Texture Synthesis", id='tab_texture_syn'):
31
- create_interface_texture_synthesis(runner=runner)
32
-
33
- demo.queue().lanuch()
34
- # demo.launch(share=False, debug=False)
35
-
36
-
37
- if __name__ == '__main__':
38
- main()
 
1
+ import gradio as gr
2
+ from webui import (
3
+ create_interface_texture_synthesis,
4
+ create_interface_style_t2i,
5
+ create_interface_style_transfer,
6
+ Runner
7
+ )
8
+
9
+
10
+
11
+
12
+ def main():
13
+ runner = Runner()
14
+
15
+ with gr.Blocks(analytics_enabled=False,
16
+ title='Attention Distillation',
17
+ ) as demo:
18
+
19
+ md_txt = "# Attention Distillation" \
20
+ "\nOfficial demo of the paper [Attention Distillation: A Unified Approach to Visual Characteristics Transfer](https://arxiv.org/abs/2502.20235)"
21
+ gr.Markdown(md_txt)
22
+
23
+ with gr.Tabs(selected='tab_style_transfer'):
24
+ with gr.TabItem("Style Transfer", id='tab_style_transfer'):
25
+ create_interface_style_transfer(runner=runner)
26
+
27
+ with gr.TabItem("Style-Specific Text-to-Image Generation", id='tab_style_t2i'):
28
+ create_interface_style_t2i(runner=runner)
29
+
30
+ with gr.TabItem("Texture Synthesis", id='tab_texture_syn'):
31
+ create_interface_texture_synthesis(runner=runner)
32
+
33
+ demo.queue().launch()
34
+ # demo.launch(share=False, debug=False)
35
+
36
+
37
+ if __name__ == '__main__':
38
+ main()