sohojoe commited on
Commit
7baa44d
1 Parent(s): 7989328

add some basic read me

Browse files
Files changed (1) hide show
  1. app.py +31 -3
app.py CHANGED
@@ -225,6 +225,15 @@ examples = [
225
 
226
 
227
  with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
228
  with gr.Row():
229
  for i in range(max_tabs):
230
  with gr.Tab(f"Input {i+1}"):
@@ -246,7 +255,8 @@ with gr.Blocks() as demo:
246
  with gr.Row():
247
  with gr.Accordion(f"Avergage embeddings in base 64", open=False):
248
  average_embedding_base64 = gr.Textbox(show_label=False)
249
-
 
250
  with gr.Row():
251
  with gr.Column(scale=1, min_width=200):
252
  scale = gr.Slider(0, 25, value=3, step=1, label="Guidance scale")
@@ -256,8 +266,6 @@ with gr.Blocks() as demo:
256
  steps = gr.Slider(5, 50, value=25, step=5, label="Steps")
257
  with gr.Column(scale=1, min_width=200):
258
  seed = gr.Number(None, label="Seed", precision=0)
259
- with gr.Row():
260
- submit = gr.Button("Submit")
261
  with gr.Row():
262
  output = gr.Gallery(label="Generated variations")
263
 
@@ -277,6 +285,26 @@ with gr.Blocks() as demo:
277
  submit.click(main, inputs= [average_embedding_base64, scale, n_samples, steps, seed], outputs=output)
278
  output.style(grid=2)
279
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
 
281
 
282
  if __name__ == "__main__":
 
225
 
226
 
227
  with gr.Blocks() as demo:
228
+ with gr.Row():
229
+ gr.Markdown(
230
+ """# Soho-Clip
231
+
232
+ A tool for exploring CLIP embedding spaces.
233
+ My interest is to use CLIP for image/video understanding (see [CLIP_visual-spatial-reasoning](https://github.com/Sohojoe/CLIP_visual-spatial-reasoning).)
234
+
235
+ Try it out by uploading a few images/add text prompts and generate images of the average of their embeddings
236
+ """)
237
  with gr.Row():
238
  for i in range(max_tabs):
239
  with gr.Tab(f"Input {i+1}"):
 
255
  with gr.Row():
256
  with gr.Accordion(f"Avergage embeddings in base 64", open=False):
257
  average_embedding_base64 = gr.Textbox(show_label=False)
258
+ with gr.Row():
259
+ submit = gr.Button("Generate images")
260
  with gr.Row():
261
  with gr.Column(scale=1, min_width=200):
262
  scale = gr.Slider(0, 25, value=3, step=1, label="Guidance scale")
 
266
  steps = gr.Slider(5, 50, value=25, step=5, label="Steps")
267
  with gr.Column(scale=1, min_width=200):
268
  seed = gr.Number(None, label="Seed", precision=0)
 
 
269
  with gr.Row():
270
  output = gr.Gallery(label="Generated variations")
271
 
 
285
  submit.click(main, inputs= [average_embedding_base64, scale, n_samples, steps, seed], outputs=output)
286
  output.style(grid=2)
287
 
288
+ with gr.Row():
289
+ gr.Markdown(
290
+ """### Initial Features
291
+
292
+ - Combine up to 10 Images and/or text inputs to create an average embedding space.
293
+ - View embedding spaces as graph
294
+ - Generate a new image based on the average embedding space
295
+
296
+ ### Known limitations
297
+
298
+ - Text input is a little off (requires fine tuning and I'm having issues with that at the moment)
299
+ - It can only generate a single image at a time
300
+ - Not easy to use the sample images
301
+
302
+ ### Acknowledgements
303
+
304
+ - I heavily build on Justin Pinkney's Experiments in Image Variation (see https://www.justinpinkney.com/image-variation-experiments). Please credit them if you use this work.
305
+
306
+ """)
307
+
308
 
309
 
310
  if __name__ == "__main__":