DigiP-AI commited on
Commit
634bf55
·
verified ·
1 Parent(s): 15b4ae5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -200,18 +200,17 @@ with gr.Blocks(theme=theme, css=css) as app:
200
  # Bind the button to the query function with the added width and height inputs
201
  text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
202
 
203
- with gr.Tabs() as tabs:
204
- with gr.TabItem(label="Image To Prompt"):
205
- with gr.Row():
206
- with gr.Column():
207
- input_img = gr.Image(label="Input Picture",height=320,type="filepath")
208
- submit_btn = gr.Button(value="Submit", variant='primary')
209
- with gr.Column():
210
- output_text = gr.Textbox(label="Flux Prompt", show_copy_button = True)
211
- clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
212
- clr_button.click(lambda: gr.Textbox(value=""), None, output_text)
213
 
214
- submit_btn.click(feifeichat, [input_img], [output_text])
215
 
216
 
217
  app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
 
200
  # Bind the button to the query function with the added width and height inputs
201
  text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
202
 
203
+ with gr.TabItem(label="Image To Prompt"):
204
+ with gr.Row():
205
+ with gr.Column():
206
+ input_img = gr.Image(label="Input Picture",height=320,type="filepath")
207
+ submit_btn = gr.Button(value="Submit", variant='primary')
208
+ with gr.Column():
209
+ output_text = gr.Textbox(label="Flux Prompt", show_copy_button = True)
210
+ clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
211
+ clr_button.click(lambda: gr.Textbox(value=""), None, output_text)
 
212
 
213
+ submit_btn.click(feifeichat, [input_img], [output_text])
214
 
215
 
216
  app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters