sohojoe commited on
Commit
88f7e7b
1 Parent(s): 21aa202

add examples

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -346,7 +346,13 @@ with gr.Blocks() as demo:
346
 
347
  A tool for exploring CLIP embedding space.
348
 
349
- Try uploading a few images and/or add some text prompts and search the embedding space.
 
 
 
 
 
 
350
  """)
351
  with gr.Column(scale=2, min_width=(tile_size+20)*3):
352
  with gr.Row():
@@ -475,13 +481,20 @@ Try uploading a few images and/or add some text prompts and search the embedding
475
  submit.click(main, inputs= [average_embedding_base64, n_samples], outputs=output)
476
  # output.style(grid=[4,4], height="auto", container=True)
477
  # output.style(grid=[4,4], container=True)
478
- output.style(grid=2)
479
 
480
  with gr.Row():
481
  gr.Markdown(
482
  """
483
  My interest is to use CLIP for image/video understanding (see [CLIP_visual-spatial-reasoning](https://github.com/Sohojoe/CLIP_visual-spatial-reasoning).)
484
 
 
 
 
 
 
 
 
485
 
486
  ### Initial Features
487
 
@@ -490,7 +503,9 @@ My interest is to use CLIP for image/video understanding (see [CLIP_visual-spati
490
 
491
  ### Known limitations
492
 
493
- - ...
 
 
494
 
495
  ### Acknowledgements
496
 
 
346
 
347
  A tool for exploring CLIP embedding space.
348
 
349
+ **Example #1** - removing the Teacup from the image
350
+
351
+ * Add the image Pups->Pup1 on Input tab 1
352
+ * Add the text prompt "Teacup." on Input tab 2
353
+ * Make the Input 2 embeddings negative by setting the power to -1
354
+ * Click the "Search Embedding Space" to see the results
355
+
356
  """)
357
  with gr.Column(scale=2, min_width=(tile_size+20)*3):
358
  with gr.Row():
 
481
  submit.click(main, inputs= [average_embedding_base64, n_samples], outputs=output)
482
  # output.style(grid=[4,4], height="auto", container=True)
483
  # output.style(grid=[4,4], container=True)
484
+ output.style(grid=4)
485
 
486
  with gr.Row():
487
  gr.Markdown(
488
  """
489
  My interest is to use CLIP for image/video understanding (see [CLIP_visual-spatial-reasoning](https://github.com/Sohojoe/CLIP_visual-spatial-reasoning).)
490
 
491
+ **Example #2** - adding black & white embeddings
492
+
493
+ * Add the image Pups->Pup4 on Input tab 1
494
+ * Add Embeddings->Black&White on Input tab 2
495
+ * Set Input 2 embeddings power to 1.3
496
+ * Click the "Search Embedding Space" to see the results
497
+ * Note: You may need to play with the power with different source images
498
 
499
  ### Initial Features
500
 
 
503
 
504
  ### Known limitations
505
 
506
+ - I'm getting formatting bugs when running on Huggingface (vs my Mac Book). This is impacting:
507
+ - The galary
508
+ - The Embeddings Tab
509
 
510
  ### Acknowledgements
511