omer11a commited on
Commit
3894e3f
·
1 Parent(s): 58ad0e0

Improved examples

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -19,11 +19,16 @@ MIN_SIZE = 0.01
19
  WHITE = 255
20
  COLORS = ["red", "blue", "green", "orange", "purple", "turquoise", "olive"]
21
 
 
22
  PROMPT2 = "3 D Pixar animation of a cute unicorn and a pink hedgehog and a nerdy owl traveling in a magical forest"
23
  PROMPT3 = "science fiction movie poster with an astronaut and a robot and a green alien and a spaceship"
24
  PROMPT4 = "a realistic photo of a highway with a semi trailer and a concrete mixer and a helicopter"
25
  PROMPT5 = "a golden retriever and a german shepherd and a boston terrier and an english bulldog and a border collie in a pool"
26
  EXAMPLE_BOXES = {
 
 
 
 
27
  PROMPT2 : [
28
  [0.35, 0.4, 0.65, 0.9],
29
  [0, 0.6, 0.3, 0.9],
@@ -392,12 +397,13 @@ def main():
392
 
393
  with gr.Column():
394
  gr.Examples(
395
- #examples=[
396
- # ["a ginger kitten and a gray puppy in a yard", "2,3;6,7", "1,4,5,8,9", "10"],
397
- # ["a realistic photo of a highway with a semi trailer and a concrete mixer and a helicopter", "9,10;13,14;17", "1,4,5,7,8,11,12,15,16", "17"],
398
- #],
399
- #inputs=[prompt, subject_token_indices, filter_token_indices, num_tokens],
400
  examples=[
 
 
 
 
 
 
401
  [
402
  PROMPT2, "7,8,17;11,12,17;15,16,17", "5,6,9,10,13,14,18,19", "21",
403
  25, 18, 3, 1, 1,
@@ -420,7 +426,7 @@ def main():
420
  PROMPT5, "2,3;6,7;10,11;14,15;18,19", "1,4,5,8,9,12,13,16,17,20,21", "22",
421
  18, 12, 3, 1, 1,
422
  7.5, 1, 5, 0.2, 8,
423
- 156,
424
  ],
425
  ],
426
  fn=build_example_layout,
 
19
  WHITE = 255
20
  COLORS = ["red", "blue", "green", "orange", "purple", "turquoise", "olive"]
21
 
22
+ PROMPT1 = "a ginger kitten and a gray puppy in a yard"
23
  PROMPT2 = "3 D Pixar animation of a cute unicorn and a pink hedgehog and a nerdy owl traveling in a magical forest"
24
  PROMPT3 = "science fiction movie poster with an astronaut and a robot and a green alien and a spaceship"
25
  PROMPT4 = "a realistic photo of a highway with a semi trailer and a concrete mixer and a helicopter"
26
  PROMPT5 = "a golden retriever and a german shepherd and a boston terrier and an english bulldog and a border collie in a pool"
27
  EXAMPLE_BOXES = {
28
+ PROMPT1: [
29
+ [0.15, 0.2, 0.45, 0.9],
30
+ [0.55, 0.25, 0.85, 0.95],
31
+ ],
32
  PROMPT2 : [
33
  [0.35, 0.4, 0.65, 0.9],
34
  [0, 0.6, 0.3, 0.9],
 
397
 
398
  with gr.Column():
399
  gr.Examples(
 
 
 
 
 
400
  examples=[
401
+ [
402
+ PROMPT1, "2,3;6,7", "1,4,5,8,9", "10",
403
+ 15, 10, 3, 1, 1,
404
+ 7.5, 1, 5, 0.2, 8,
405
+ 12,
406
+ ],
407
  [
408
  PROMPT2, "7,8,17;11,12,17;15,16,17", "5,6,9,10,13,14,18,19", "21",
409
  25, 18, 3, 1, 1,
 
426
  PROMPT5, "2,3;6,7;10,11;14,15;18,19", "1,4,5,8,9,12,13,16,17,20,21", "22",
427
  18, 12, 3, 1, 1,
428
  7.5, 1, 5, 0.2, 8,
429
+ 152,
430
  ],
431
  ],
432
  fn=build_example_layout,