Spaces:
Running
on
Zero
Running
on
Zero
chore: moved generate button
Browse files
app.py
CHANGED
@@ -100,6 +100,8 @@ def main():
|
|
100 |
v2.ui()
|
101 |
|
102 |
with gr.Column():
|
|
|
|
|
103 |
with gr.Group():
|
104 |
output_text = gr.TextArea(label="Output tags", interactive=False)
|
105 |
copy_btn = gr.Button(
|
@@ -225,7 +227,7 @@ def main():
|
|
225 |
],
|
226 |
)
|
227 |
|
228 |
-
|
229 |
parse_upsampling_output(v2.on_generate),
|
230 |
inputs=[
|
231 |
*v2.get_inputs(),
|
|
|
100 |
v2.ui()
|
101 |
|
102 |
with gr.Column():
|
103 |
+
generate_btn = gr.Button(value="Generate tags", variant="primary")
|
104 |
+
|
105 |
with gr.Group():
|
106 |
output_text = gr.TextArea(label="Output tags", interactive=False)
|
107 |
copy_btn = gr.Button(
|
|
|
227 |
],
|
228 |
)
|
229 |
|
230 |
+
generate_btn.click(
|
231 |
parse_upsampling_output(v2.on_generate),
|
232 |
inputs=[
|
233 |
*v2.get_inputs(),
|
v2.py
CHANGED
@@ -210,8 +210,6 @@ class V2UI:
|
|
210 |
value=list(ALL_MODELS.keys())[0],
|
211 |
)
|
212 |
|
213 |
-
self.generate_btn = gr.Button(value="Generate", variant="primary")
|
214 |
-
|
215 |
self.input_components = [
|
216 |
model_name,
|
217 |
input_copyright,
|
@@ -224,8 +222,5 @@ class V2UI:
|
|
224 |
input_ban_tags,
|
225 |
]
|
226 |
|
227 |
-
def get_generate_btn(self) -> gr.Button:
|
228 |
-
return self.generate_btn
|
229 |
-
|
230 |
def get_inputs(self) -> list[Component]:
|
231 |
return self.input_components
|
|
|
210 |
value=list(ALL_MODELS.keys())[0],
|
211 |
)
|
212 |
|
|
|
|
|
213 |
self.input_components = [
|
214 |
model_name,
|
215 |
input_copyright,
|
|
|
222 |
input_ban_tags,
|
223 |
]
|
224 |
|
|
|
|
|
|
|
225 |
def get_inputs(self) -> list[Component]:
|
226 |
return self.input_components
|