fffiloni commited on
Commit
6c71d3e
1 Parent(s): 761be53

Rearrange example

Browse files
Files changed (1) hide show
  1. app.py +23 -7
app.py CHANGED
@@ -97,18 +97,34 @@ with gr.Blocks(css=css) as demo:
97
  with gr.Row():
98
  with gr.Column():
99
  with gr.Group():
100
- ref_path = gr.Image(type="filepath", value="./example_image/medieval-bed.jpeg")
101
- ref_style = gr.Textbox(label="Reference style", value="medieval painting")
102
- ref_prompt = gr.Textbox(label="Reference prompt", value="Man laying on bed")
103
 
104
  with gr.Column():
105
  with gr.Group():
106
  results = gr.Gallery()
107
- prompt1 = gr.Textbox(label="Prompt1", value="A man working on a laptop")
108
- prompt2 = gr.Textbox(label="Prompt2", value="A man eating pizza", visible=False)
109
- prompt3 = gr.Textbox(label="Prompt3", value="A woman playing on saxophone", visible=False)
110
  run_button = gr.Button("Submit")
111
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
 
114
  run_button.click(
 
97
  with gr.Row():
98
  with gr.Column():
99
  with gr.Group():
100
+ ref_path = gr.Image(type="filepath")
101
+ ref_style = gr.Textbox(label="Reference style")
102
+ ref_prompt = gr.Textbox(label="Reference prompt")
103
 
104
  with gr.Column():
105
  with gr.Group():
106
  results = gr.Gallery()
107
+ prompt1 = gr.Textbox(label="Prompt1")
108
+ prompt2 = gr.Textbox(label="Prompt2")
109
+ prompt3 = gr.Textbox(label="Prompt3")
110
  run_button = gr.Button("Submit")
111
+
112
+ gr.Examples(
113
+ examples=[
114
+ [
115
+ "./example_image/medieval-bed.jpeg",
116
+ "medieval painting",
117
+ "Man laying on bed",
118
+ "A man working on a laptop",
119
+ "A man eating pizza",
120
+ "A woman playing on saxophone"
121
+ ]
122
+ ],
123
+ inputs = [
124
+ ref_path, ref_style, ref_prompt,
125
+ prompt1, prompt2, prompt3
126
+ ]
127
+ )
128
 
129
 
130
  run_button.click(