Update app.py
Browse files
app.py
CHANGED
@@ -154,6 +154,18 @@ footer{display:none !important}
|
|
154 |
with gr.Blocks(theme=theme, css=css) as app:
|
155 |
# Add a title to the app
|
156 |
gr.HTML("<center><h1>π¨ Stable Diffusion 3.5 large turbo π¬π§</h1></center>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
with gr.Tabs() as tabs:
|
158 |
with gr.TabItem("Text to Image"):
|
159 |
# Container for all the UI elements
|
@@ -200,17 +212,6 @@ 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.Tab(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 |
if __name__ == "__main__":
|
|
|
154 |
with gr.Blocks(theme=theme, css=css) as app:
|
155 |
# Add a title to the app
|
156 |
gr.HTML("<center><h1>π¨ Stable Diffusion 3.5 large turbo π¬π§</h1></center>")
|
157 |
+
with gr.Tab(label="Image To Prompt"):
|
158 |
+
with gr.Row():
|
159 |
+
with gr.Column():
|
160 |
+
input_img = gr.Image(label="Input Picture",height=320,type="filepath")
|
161 |
+
submit_btn = gr.Button(value="Submit", variant='primary')
|
162 |
+
with gr.Column():
|
163 |
+
output_text = gr.Textbox(label="Flux Prompt", show_copy_button = True)
|
164 |
+
clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
|
165 |
+
clr_button.click(lambda: gr.Textbox(value=""), None, output_text)
|
166 |
+
|
167 |
+
submit_btn.click(feifeichat, [input_img], [output_text])
|
168 |
+
|
169 |
with gr.Tabs() as tabs:
|
170 |
with gr.TabItem("Text to Image"):
|
171 |
# Container for all the UI elements
|
|
|
212 |
# Bind the button to the query function with the added width and height inputs
|
213 |
text_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, seed, strength, width, height], outputs=image_output)
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
|
217 |
if __name__ == "__main__":
|