minarainbow commited on
Commit
d34c8dd
·
1 Parent(s): f68f9eb

add examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def load_example(prompt, img0):
17
  for i in range(4):
18
  x = i % 2 * single_width
19
  y = i // 2 * single_height
20
- single_filename = f'img{i+1}.jpeg'
21
  splitted_images.append(single_filename)
22
  img0.crop((x, y, x + single_width, y + single_height)).save(single_filename, quality=100)
23
  if prompt == "A young chef is cooking the dinner for his parents":
@@ -57,7 +57,7 @@ with gr.Blocks() as demo:
57
  max_rows=None
58
  )
59
  gr.Examples(
60
- examples=[["A young chef is cooking the dinner for his parents", "demo1.jpeg"], ["Young man and woman walking on a sunny beach, the sun is visible in the frame, on a white background", "demo2.jpeg"], ["Black female, hair stylist, designing her room", "demo3.jpeg"], ["Use plastic that is durable rather than the one that breaks soon.", "demo4.jpeg"], ["An interpreter in a boot with headphones and microphones, reading notes, listening and speaking", "demo5.jpeg"]],
61
  inputs=[prompt, img0],
62
  outputs=[img1, img2, img3, img4, table1],
63
  fn=load_example,
 
17
  for i in range(4):
18
  x = i % 2 * single_width
19
  y = i // 2 * single_height
20
+ single_filename = f'img{i+1}.jpg'
21
  splitted_images.append(single_filename)
22
  img0.crop((x, y, x + single_width, y + single_height)).save(single_filename, quality=100)
23
  if prompt == "A young chef is cooking the dinner for his parents":
 
57
  max_rows=None
58
  )
59
  gr.Examples(
60
+ examples=[["A young chef is cooking the dinner for his parents", "demo1.jpg"], ["Young man and woman walking on a sunny beach, the sun is visible in the frame, on a white background", "demo2.jpg"], ["Black female, hair stylist, designing her room", "demo3.jpg"], ["Use plastic that is durable rather than the one that breaks soon.", "demo4.jpg"], ["An interpreter in a boot with headphones and microphones, reading notes, listening and speaking", "demo5.jpg"]],
61
  inputs=[prompt, img0],
62
  outputs=[img1, img2, img3, img4, table1],
63
  fn=load_example,