TroglodyteDerivations commited on
Commit
d84e707
1 Parent(s): 9c399f8

Updated with removal of hashtag on line 536. And hashtag removal on line 511

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -508,7 +508,7 @@ def optimize(npart, ndim, max_iter):
508
  plot_contour_and_wolves = gwo.plot_contour_and_wolves(best_positions_array)
509
 
510
  # Plot the dispersion over time
511
- #dispersion_plot = gwo.plot_dispersion()
512
 
513
  # Plot the dispersion heatmap
514
  #dispersion_heatmap_plot = gwo.plot_dispersion_heatmap(x_range=(-6,6), y_range=(-6,6))
@@ -518,7 +518,7 @@ def optimize(npart, ndim, max_iter):
518
  best_positions_text = f"Best Positions: {best_positions_npy}"
519
 
520
  # Return the images and text
521
- return plot_contour_and_wolves, best_fitness_text, best_positions_text, best_fitness_npy, best_positions_npy, dispersion_text #dispersion_plot, dispersion_heatmap_plot, best_fitness_text, best_positions_text, best_fitness_npy, best_positions_npy, dispersion_text
522
 
523
 
524
 
@@ -533,7 +533,7 @@ iface = gr.Interface(
533
  ],
534
  outputs=[
535
  gr.components.Image(type="pil", label="Contour Map of Wolves Oscillating Over Search Space"),
536
- #gr.components.Image(type="pil", label="Dispersion Plot"),
537
  #gr.components.Image(type="pil", label="Dispersion Heatmap Plot"),
538
  gr.components.Textbox(label="Dispersion Values"),
539
  gr.components.Textbox(label="Best Positions"),
 
508
  plot_contour_and_wolves = gwo.plot_contour_and_wolves(best_positions_array)
509
 
510
  # Plot the dispersion over time
511
+ dispersion_plot = gwo.plot_dispersion()
512
 
513
  # Plot the dispersion heatmap
514
  #dispersion_heatmap_plot = gwo.plot_dispersion_heatmap(x_range=(-6,6), y_range=(-6,6))
 
518
  best_positions_text = f"Best Positions: {best_positions_npy}"
519
 
520
  # Return the images and text
521
+ return plot_contour_and_wolves, dispersion_plot, best_fitness_text, best_positions_text, best_fitness_npy, best_positions_npy, dispersion_text #dispersion_heatmap_plot, best_fitness_text, best_positions_text, best_fitness_npy, best_positions_npy, dispersion_text
522
 
523
 
524
 
 
533
  ],
534
  outputs=[
535
  gr.components.Image(type="pil", label="Contour Map of Wolves Oscillating Over Search Space"),
536
+ gr.components.Image(type="pil", label="Dispersion Plot"),
537
  #gr.components.Image(type="pil", label="Dispersion Heatmap Plot"),
538
  gr.components.Textbox(label="Dispersion Values"),
539
  gr.components.Textbox(label="Best Positions"),