Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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().
|
| 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()
|