Pijush2023 commited on
Commit
c5fb5c4
·
verified ·
1 Parent(s): d650995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -1514,16 +1514,13 @@ with gr.Blocks(theme='Pijush2023/scikit-learn-pijush') as demo:
1514
  # refresh_button = gr.Button("Refresh Images")
1515
  # refresh_button.click(fn=update_images, inputs=None, outputs=[image_output_1, image_output_2, image_output_3])
1516
 
1517
- # Displaying the images generated using Flux API
1518
- image_output_1 = gr.Image(label="Image 1", elem_id="flux_image_1", width=400, height=400)
1519
- image_output_2 = gr.Image(label="Image 2", elem_id="flux_image_2", width=400, height=400)
1520
- image_output_3 = gr.Image(label="Image 3", elem_id="flux_image_3", width=400, height=400)
1521
-
1522
  # Call update_images during the initial load to display images when the interface appears
1523
  initial_images = update_images()
1524
- image_output_1.update(value=initial_images[0])
1525
- image_output_2.update(value=initial_images[1])
1526
- image_output_3.update(value=initial_images[2])
 
 
1527
 
1528
  # Refresh button to update images
1529
  refresh_button = gr.Button("Refresh Images")
 
1514
  # refresh_button = gr.Button("Refresh Images")
1515
  # refresh_button.click(fn=update_images, inputs=None, outputs=[image_output_1, image_output_2, image_output_3])
1516
 
 
 
 
 
 
1517
  # Call update_images during the initial load to display images when the interface appears
1518
  initial_images = update_images()
1519
+
1520
+ # Displaying the images generated using Flux API directly
1521
+ image_output_1 = gr.Image(value=initial_images[0], label="Image 1", elem_id="flux_image_1", width=400, height=400)
1522
+ image_output_2 = gr.Image(value=initial_images[1], label="Image 2", elem_id="flux_image_2", width=400, height=400)
1523
+ image_output_3 = gr.Image(value=initial_images[2], label="Image 3", elem_id="flux_image_3", width=400, height=400)
1524
 
1525
  # Refresh button to update images
1526
  refresh_button = gr.Button("Refresh Images")