QHL067 commited on
Commit
9a2c7cc
·
1 Parent(s): a5ded5e
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -69,22 +69,24 @@ with gr.Blocks(css=css) as demo:
69
  gr.Markdown(" # Text-to-Image Gradio Template")
70
 
71
  with gr.Row():
72
- prompt = gr.Text(
73
  label="Prompt_1",
74
  show_label=False,
75
  max_lines=1,
76
  placeholder="Enter your prompt for the first image",
77
  container=False,
78
  )
79
-
80
- prompt = gr.Text(
 
81
  label="Prompt_2",
82
  show_label=False,
83
  max_lines=1,
84
- placeholder="Enter your prompt for the second",
85
  container=False,
86
  )
87
 
 
88
  run_button = gr.Button("Run", scale=0, variant="primary")
89
 
90
  result = gr.Image(label="Result", show_label=False)
@@ -141,12 +143,13 @@ with gr.Blocks(css=css) as demo:
141
  value=2, # Replace with defaults that work for your model
142
  )
143
 
144
- gr.Examples(examples=examples, inputs=[prompt])
145
  gr.on(
146
- triggers=[run_button.click, prompt.submit],
147
  fn=infer,
148
  inputs=[
149
- prompt,
 
150
  negative_prompt,
151
  seed,
152
  randomize_seed,
 
69
  gr.Markdown(" # Text-to-Image Gradio Template")
70
 
71
  with gr.Row():
72
+ prompt1 = gr.Text(
73
  label="Prompt_1",
74
  show_label=False,
75
  max_lines=1,
76
  placeholder="Enter your prompt for the first image",
77
  container=False,
78
  )
79
+
80
+ with gr.Row():
81
+ prompt2 = gr.Text(
82
  label="Prompt_2",
83
  show_label=False,
84
  max_lines=1,
85
+ placeholder="Enter your prompt for the second image",
86
  container=False,
87
  )
88
 
89
+ with gr.Row():
90
  run_button = gr.Button("Run", scale=0, variant="primary")
91
 
92
  result = gr.Image(label="Result", show_label=False)
 
143
  value=2, # Replace with defaults that work for your model
144
  )
145
 
146
+ gr.Examples(examples=examples, inputs=[prompt1, prompt2])
147
  gr.on(
148
+ triggers=[run_button.click, prompt1.submit, prompt2.submit],
149
  fn=infer,
150
  inputs=[
151
+ prompt1,
152
+ prompt2,
153
  negative_prompt,
154
  seed,
155
  randomize_seed,