Update app.py
Browse files
app.py
CHANGED
|
@@ -221,6 +221,7 @@ with gr.Blocks(title="Virtual Try-On", css=".thumbnail { height: 100px !importan
|
|
| 221 |
label="Salesforce Status",
|
| 222 |
value="Connected" if sf_connector.is_connected() else "Disconnected"
|
| 223 |
)
|
|
|
|
| 224 |
|
| 225 |
with gr.Column():
|
| 226 |
output_image = gr.Image(label="Your Virtual Try-On", interactive=False)
|
|
@@ -248,6 +249,12 @@ with gr.Blocks(title="Virtual Try-On", css=".thumbnail { height: 100px !importan
|
|
| 248 |
outputs=[dress_dropdown, connection_status]
|
| 249 |
)
|
| 250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
try_btn.click(
|
| 252 |
fn=process_try_on,
|
| 253 |
inputs=[input_image, dress_dropdown, dress_type],
|
|
|
|
| 221 |
label="Salesforce Status",
|
| 222 |
value="Connected" if sf_connector.is_connected() else "Disconnected"
|
| 223 |
)
|
| 224 |
+
refresh_manual = gr.Button("🔄 Manual Refresh") # Added manual refresh button
|
| 225 |
|
| 226 |
with gr.Column():
|
| 227 |
output_image = gr.Image(label="Your Virtual Try-On", interactive=False)
|
|
|
|
| 249 |
outputs=[dress_dropdown, connection_status]
|
| 250 |
)
|
| 251 |
|
| 252 |
+
refresh_manual.click(
|
| 253 |
+
fn=update_dress_dropdown,
|
| 254 |
+
inputs=dress_type,
|
| 255 |
+
outputs=[dress_dropdown, connection_status]
|
| 256 |
+
)
|
| 257 |
+
|
| 258 |
try_btn.click(
|
| 259 |
fn=process_try_on,
|
| 260 |
inputs=[input_image, dress_dropdown, dress_type],
|