MCPcopy Create free account
hub / github.com/ali-vilab/ACE_plus / create_ui

Method create_ui

demo_fft.py:110–267  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108 return None
109
110 def create_ui(self):
111 with gr.Row(equal_height=True, visible=True):
112 with gr.Column(scale=2):
113 self.gallery_image = gr.Image(
114 height=600,
115 interactive=False,
116 type='pil',
117 elem_id='Reference_image'
118 )
119 with gr.Column(scale=1, visible=True) as self.edit_preprocess_panel:
120 with gr.Row():
121 with gr.Accordion(label='Related Input Image', open=False):
122 self.edit_preprocess_preview = gr.Image(
123 height=600,
124 interactive=False,
125 type='pil',
126 elem_id='preprocess_image',
127 label='edit image'
128 )
129
130 self.edit_preprocess_mask_preview = gr.Image(
131 height=600,
132 interactive=False,
133 type='pil',
134 elem_id='preprocess_image_mask',
135 label='edit mask'
136 )
137
138 self.change_preprocess_preview = gr.Image(
139 height=600,
140 interactive=False,
141 type='pil',
142 elem_id='preprocess_change_image',
143 label='change image'
144 )
145 with gr.Row():
146 instruction = """
147 **Instruction**:
148 Users can perform reference generation or editing tasks by uploading reference images
149 and editing images. When uploading the editing image, various editing types are available
150 for selection. Users can choose different dimensions of information preservation,
151 such as edge information, color information, and more. Pre-processing information
152 can be viewed in the 'related input image' tab.
153 """
154 self.instruction = gr.Markdown(value=instruction)
155 with gr.Row():
156 self.icon = gr.Image(
157 value=None,
158 interactive=False,
159 height=150,
160 type='pil',
161 elem_id='icon',
162 label='icon'
163 )
164 with gr.Row():
165 self.model_name_dd = gr.Dropdown(
166 choices=self.model_choices,
167 value=self.default_model_name,

Callers 1

run_grFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected