uhdessai commited on
Commit
5b83a90
·
verified ·
1 Parent(s): e55d57d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -201,32 +201,32 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue")) as demo:
201
  outputs = []
202
 
203
  with gr.Row():
204
- for i in range(2): # Only 2 images
205
- with gr.Column():
206
- img = gr.Image(width=180, height=180, label=f"Design {i+1}")
207
- image_components.append(img)
208
-
209
- file_path = gr.Textbox(visible=False)
210
- file_paths.append(file_path)
211
-
212
- save_btn = gr.Button("💾 Save to DB")
213
- save_buttons.append(save_btn)
214
-
215
- output = gr.Textbox(label="Status", interactive=False)
216
- outputs.append(output)
217
-
218
- save_btn.click(
219
- fn=send_to_backend,
220
- inputs=[file_path, user_id_state],
221
- outputs=output
222
- )
223
 
224
 
225
  examples = gr.Examples(
226
  examples = [
227
  ["Black velvet blazer"],
228
  ["Pink blazer with buttons"]
229
- ],
230
  inputs=[input_box]
231
  )
232
 
 
201
  outputs = []
202
 
203
  with gr.Row():
204
+ for i in range(2): # Only 2 images
205
+ with gr.Column():
206
+ img = gr.Image(width=180, height=180, label=f"Design {i+1}")
207
+ image_components.append(img)
208
+
209
+ file_path = gr.Textbox(visible=False)
210
+ file_paths.append(file_path)
211
+
212
+ save_btn = gr.Button("💾 Save to DB")
213
+ save_buttons.append(save_btn)
214
+
215
+ output = gr.Textbox(label="Status", interactive=False)
216
+ outputs.append(output)
217
+
218
+ save_btn.click(
219
+ fn=send_to_backend,
220
+ inputs=[file_path, user_id_state],
221
+ outputs=output
222
+ )
223
 
224
 
225
  examples = gr.Examples(
226
  examples = [
227
  ["Black velvet blazer"],
228
  ["Pink blazer with buttons"]
229
+ ],
230
  inputs=[input_box]
231
  )
232