Spaces:
Running
Running
chen....
Browse files
app.py
CHANGED
@@ -156,29 +156,26 @@ if __name__ == '__main__':
|
|
156 |
with gr.Blocks() as demo:
|
157 |
with gr.Row():
|
158 |
with gr.Column():
|
159 |
-
gr_input_image = gr.Image(type='pil', label='
|
160 |
with gr.Row():
|
161 |
gr_model = gr.Radio(list(WAIFU_MODELS.keys()), value='wd14-vit', label='Waifu Model')
|
162 |
gr_threshold = gr.Slider(0.0, 1.0, 0.5, label='Chen Chen Chen Chen Chen')
|
163 |
with gr.Row():
|
164 |
-
gr_space = gr.Checkbox(value=
|
165 |
-
gr_escape = gr.Checkbox(value=True, label='Use Text Escape')
|
166 |
-
gr_confidence = gr.Checkbox(value=False, label='Keep Confidences')
|
167 |
-
gr_order = gr.Checkbox(value=True, label='Descend By Confidence')
|
168 |
|
169 |
-
gr_btn_submit = gr.Button(value='
|
170 |
|
171 |
with gr.Column():
|
172 |
-
gr_ratings = gr.Label(label='
|
173 |
with gr.Tabs():
|
174 |
-
with gr.Tab("
|
175 |
-
gr_tags = gr.Label(label='
|
176 |
-
with gr.Tab("Exported
|
177 |
-
gr_output_text = gr.TextArea(label='Exported
|
178 |
|
179 |
gr_btn_submit.click(
|
180 |
image_to_wd14_tags,
|
181 |
-
inputs=[gr_input_image, gr_model, gr_threshold, gr_space,
|
182 |
outputs=[gr_ratings, gr_output_text, gr_tags],
|
183 |
)
|
184 |
demo.queue(os.cpu_count()).launch()
|
|
|
156 |
with gr.Blocks() as demo:
|
157 |
with gr.Row():
|
158 |
with gr.Column():
|
159 |
+
gr_input_image = gr.Image(type='pil', label='Chen')
|
160 |
with gr.Row():
|
161 |
gr_model = gr.Radio(list(WAIFU_MODELS.keys()), value='wd14-vit', label='Waifu Model')
|
162 |
gr_threshold = gr.Slider(0.0, 1.0, 0.5, label='Chen Chen Chen Chen Chen')
|
163 |
with gr.Row():
|
164 |
+
gr_space = gr.Checkbox(value=True, label='Chen " " Chen Chen "_"')
|
|
|
|
|
|
|
165 |
|
166 |
+
gr_btn_submit = gr.Button(value='Chening', variant='primary')
|
167 |
|
168 |
with gr.Column():
|
169 |
+
gr_ratings = gr.Label(label='Chen?')
|
170 |
with gr.Tabs():
|
171 |
+
with gr.Tab("Chen"):
|
172 |
+
gr_tags = gr.Label(label='Chen')
|
173 |
+
with gr.Tab("Exported Chen"):
|
174 |
+
gr_output_text = gr.TextArea(label='Exported Chen')
|
175 |
|
176 |
gr_btn_submit.click(
|
177 |
image_to_wd14_tags,
|
178 |
+
inputs=[gr_input_image, gr_model, gr_threshold, gr_space, True, True, True],
|
179 |
outputs=[gr_ratings, gr_output_text, gr_tags],
|
180 |
)
|
181 |
demo.queue(os.cpu_count()).launch()
|