Update app.py
Browse files
app.py
CHANGED
@@ -251,20 +251,6 @@ height: 100% !important;
|
|
251 |
"""
|
252 |
|
253 |
with gr.Blocks(css=css, theme=theme) as app:
|
254 |
-
with gr.Tab(label="Image To Prompt"):
|
255 |
-
with gr.Row():
|
256 |
-
with gr.Column(scale=4, min_width=300):
|
257 |
-
input_img = gr.Image(label="Input Picture", type="filepath")
|
258 |
-
|
259 |
-
with gr.Column(scale=3):
|
260 |
-
output_text = gr.Textbox(label="Flux Prompt", lines=2, scale=6, show_copy_button = True)
|
261 |
-
submit_btn = gr.Button(value="Generate Pompt", scale=4, variant='primary')
|
262 |
-
clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
|
263 |
-
clear_prompt.click(lambda: (None, None), None, [input_img, output_text], queue=False, show_api=False)
|
264 |
-
|
265 |
-
submit_btn.click(feifeichat, [input_img], [output_text])
|
266 |
-
|
267 |
-
|
268 |
with gr.Tab("Basic Settings"):
|
269 |
with gr.Row():
|
270 |
prompt = gr.Textbox(placeholder="Enter the image description...", show_label=True, label='Image Prompt ✍️', lines=3, show_copy_button = True)
|
@@ -313,7 +299,18 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
313 |
img2img_b = gr.Button("Increase the image", variant='secondary')
|
314 |
image_i2i = gr.Image(show_label=True, label='Increased image:')
|
315 |
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
316 |
|
|
|
317 |
|
318 |
#app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
319 |
if __name__ == "__main__":
|
|
|
251 |
"""
|
252 |
|
253 |
with gr.Blocks(css=css, theme=theme) as app:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
with gr.Tab("Basic Settings"):
|
255 |
with gr.Row():
|
256 |
prompt = gr.Textbox(placeholder="Enter the image description...", show_label=True, label='Image Prompt ✍️', lines=3, show_copy_button = True)
|
|
|
299 |
img2img_b = gr.Button("Increase the image", variant='secondary')
|
300 |
image_i2i = gr.Image(show_label=True, label='Increased image:')
|
301 |
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
302 |
+
with gr.Tab(label="Image To Prompt"):
|
303 |
+
with gr.Row():
|
304 |
+
with gr.Column(scale=4, min_width=300):
|
305 |
+
input_img = gr.Image(label="Input Picture", type="filepath")
|
306 |
+
|
307 |
+
with gr.Column(scale=3):
|
308 |
+
output_text = gr.Textbox(label="Flux Prompt", lines=2, scale=6, show_copy_button = True)
|
309 |
+
submit_btn = gr.Button(value="Generate Pompt", scale=4, variant='primary')
|
310 |
+
clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
|
311 |
+
clear_prompt.click(lambda: (None, None), None, [input_img, output_text], queue=False, show_api=False)
|
312 |
|
313 |
+
submit_btn.click(feifeichat, [input_img], [output_text])
|
314 |
|
315 |
#app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
316 |
if __name__ == "__main__":
|