Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -166,16 +166,30 @@ if __name__ == '__main__':
|
|
166 |
gr_btn_submit = gr.Button(value='Chening', variant='primary')
|
167 |
|
168 |
with gr.Column():
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
with gr.Tabs():
|
171 |
-
with gr.Tab("
|
172 |
-
gr_tags = gr.Label(label='
|
173 |
-
with gr.Tab("Exported
|
174 |
-
gr_output_text = gr.TextArea(label='Exported
|
175 |
|
176 |
gr_btn_submit.click(
|
177 |
image_to_wd14_tags,
|
178 |
-
inputs=[gr_input_image, gr_model, gr_threshold, gr_space,
|
179 |
outputs=[gr_ratings, gr_output_text, gr_tags],
|
180 |
)
|
|
|
181 |
demo.queue(os.cpu_count()).launch()
|
|
|
166 |
gr_btn_submit = gr.Button(value='Chening', variant='primary')
|
167 |
|
168 |
with gr.Column():
|
169 |
+
gr_input_image = gr.Image(type='pil', label='Original Chen')
|
170 |
+
with gr.Row():
|
171 |
+
gr_model = gr.Radio(list(WAIFU_MODELS.keys()), value='wd14-vit', label='Waifu Model')
|
172 |
+
gr_threshold = gr.Slider(0.0, 1.0, 0.5, label='Chen Chen Chen Chen Chen')
|
173 |
+
with gr.Row():
|
174 |
+
gr_space = gr.Checkbox(value=False, label='Use Space Instead Of _')
|
175 |
+
gr_escape = gr.Checkbox(value=True, label='Use Text Escape')
|
176 |
+
gr_confidence = gr.Checkbox(value=False, label='Keep Confidences')
|
177 |
+
gr_order = gr.Checkbox(value=True, label='Descend By Confidence')
|
178 |
+
|
179 |
+
gr_btn_submit = gr.Button(value='Tagging', variant='primary')
|
180 |
+
|
181 |
+
with gr.Column():
|
182 |
+
gr_ratings = gr.Label(label='Ratings')
|
183 |
with gr.Tabs():
|
184 |
+
with gr.Tab("Tags"):
|
185 |
+
gr_tags = gr.Label(label='Tags')
|
186 |
+
with gr.Tab("Exported Text"):
|
187 |
+
gr_output_text = gr.TextArea(label='Exported Text')
|
188 |
|
189 |
gr_btn_submit.click(
|
190 |
image_to_wd14_tags,
|
191 |
+
inputs=[gr_input_image, gr_model, gr_threshold, gr_space, gr_escape, gr_confidence, gr_order],
|
192 |
outputs=[gr_ratings, gr_output_text, gr_tags],
|
193 |
)
|
194 |
+
|
195 |
demo.queue(os.cpu_count()).launch()
|