sohojoe commited on
Commit
fecbc09
1 Parent(s): 22b99cb

minor clean up

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -434,6 +434,7 @@ A tool for exploring CLIP embedding space.
434
  # .style(grid=[4,4], height="auto")
435
  output = gr.Gallery(label="Closest images in Laion 5b using kNN", show_label=True)\
436
  .style(grid=[4,4], height="auto")
 
437
 
438
 
439
  embedding_base64s_state = gr.State(value=[None for i in range(max_tabs)])
@@ -476,18 +477,6 @@ A tool for exploring CLIP embedding space.
476
  [embedding_powers[i], idx_state, embedding_base64s_state, embedding_power_state],
477
  [average_embedding_base64, average_embedding_plot])
478
 
479
-
480
- # input_images[i].change(on_image_load_update_embeddings, input_images[i], embedding_base64s[i])
481
- # input_prompts[i].change(on_prompt_change_update_embeddings, input_prompts[i], embedding_base64s[i])
482
- # embedding_base64s[i].change(on_embeddings_changed_update_plot, embedding_base64s[i], embedding_plots[i])
483
- # embedding_base64s[i].change(on_embeddings_changed_update_average_embeddings, [embedding_base64s_state, embedding_power_state, embedding_base64s[i], idx_state], average_embedding_base64)
484
- # embedding_powers[i].change(on_power_change_update_average_embeddings, [embedding_base64s_state, embedding_power_state, embedding_powers[i], idx_state], average_embedding_base64)
485
-
486
- # average_embedding_base64.change(on_embeddings_changed_update_plot, average_embedding_base64, average_embedding_plot)
487
-
488
- # submit.click(main, inputs= [embedding_base64s[0], scale, n_samples, steps, seed], outputs=output)
489
- submit.click(main, inputs= [average_embedding_base64, n_samples], outputs=output)
490
-
491
  with gr.Row():
492
  gr.Markdown(
493
  """
 
434
  # .style(grid=[4,4], height="auto")
435
  output = gr.Gallery(label="Closest images in Laion 5b using kNN", show_label=True)\
436
  .style(grid=[4,4], height="auto")
437
+ submit.click(main, inputs= [average_embedding_base64, n_samples], outputs=output)
438
 
439
 
440
  embedding_base64s_state = gr.State(value=[None for i in range(max_tabs)])
 
477
  [embedding_powers[i], idx_state, embedding_base64s_state, embedding_power_state],
478
  [average_embedding_base64, average_embedding_plot])
479
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  with gr.Row():
481
  gr.Markdown(
482
  """