Update app.py
Browse files
app.py
CHANGED
@@ -157,16 +157,16 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
157 |
# Add a title to the app
|
158 |
gr.HTML("<center><h1>π¨ Stable Diffusion 3.5 large turbo π¬π§</h1></center>")
|
159 |
with gr.Tabs() as tabs:
|
160 |
-
|
161 |
with gr.TabItem(label="Image To Prompt", visible=True, id=1):
|
162 |
-
with gr.
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
170 |
submit_btn.click(feifeichat, [input_img], [output_text])
|
171 |
|
172 |
with gr.TabItem("Text to Image", visible=True, id=0):
|
|
|
157 |
# Add a title to the app
|
158 |
gr.HTML("<center><h1>π¨ Stable Diffusion 3.5 large turbo π¬π§</h1></center>")
|
159 |
with gr.Tabs() as tabs:
|
|
|
160 |
with gr.TabItem(label="Image To Prompt", visible=True, id=1):
|
161 |
+
with gr.Row():
|
162 |
+
with gr.Column():
|
163 |
+
input_img = gr.Image(label="Input Picture",height=320,type="filepath")
|
164 |
+
submit_btn = gr.Button(value="Submit", variant='primary')
|
165 |
+
with gr.Column():
|
166 |
+
output_text = gr.Textbox(label="Flux Prompt", show_copy_button = True)
|
167 |
+
clr_button =gr.Button("Clear",variant="primary", elem_id="clear_button")
|
168 |
+
clr_button.click(lambda: gr.Textbox(value=""), None, output_text)
|
169 |
+
|
170 |
submit_btn.click(feifeichat, [input_img], [output_text])
|
171 |
|
172 |
with gr.TabItem("Text to Image", visible=True, id=0):
|