lixiang46 commited on
Commit
dcbae16
1 Parent(s): 9dcb09a

add example

Browse files
Files changed (3) hide show
  1. app.py +4 -3
  2. image/test_ip.jpg +0 -0
  3. image/test_ip2.png +0 -0
app.py CHANGED
@@ -38,7 +38,8 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
38
  return image
39
 
40
  examples = [
41
-
 
42
  ]
43
 
44
  if torch.cuda.is_available():
@@ -49,7 +50,7 @@ else:
49
  css="""
50
  #col-container {
51
  margin: 0 auto;
52
- max-width: 700px;
53
  }
54
  """
55
 
@@ -134,7 +135,7 @@ with gr.Blocks(css=css) as demo:
134
  with gr.Row():
135
  gr.Examples(
136
  examples = examples,
137
- inputs = [prompt]
138
  )
139
 
140
  run_button.click(
 
38
  return image
39
 
40
  examples = [
41
+ ["穿着黑色T恤衫,上面中文绿色大字写着“可图”", "image/test_ip.jpg", 0.5],
42
+ ["一只可爱的小狗在奔跑", "image/test_ip2.jpg", 0.5]
43
  ]
44
 
45
  if torch.cuda.is_available():
 
50
  css="""
51
  #col-container {
52
  margin: 0 auto;
53
+ max-width: 650px;
54
  }
55
  """
56
 
 
135
  with gr.Row():
136
  gr.Examples(
137
  examples = examples,
138
+ inputs = [prompt, ip_adapter_image, ip_adapter_scale]
139
  )
140
 
141
  run_button.click(
image/test_ip.jpg ADDED
image/test_ip2.png ADDED