svjack commited on
Commit
1096f1d
·
1 Parent(s): 83040ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -108,6 +108,17 @@ with gr.Blocks(css="custom.css") as demo:
108
  text_button = gr.Button("Retrieve Images", elem_id="run_button")
109
  i = gr.Image(elem_id="result-image")
110
 
 
 
 
 
 
 
 
 
 
 
 
111
  with gr.Column():
112
  title = gr.Markdown(
113
  value="### Click on a Image in the gallery to select it, and the grid order will change",
@@ -117,7 +128,7 @@ with gr.Blocks(css="custom.css") as demo:
117
  order_func_name = gr.Radio(choices=hash_func_name,
118
  value=hash_func_name[0], label="Order by", elem_id="order_radio")
119
 
120
- outputs = gr.Gallery(lable='Output gallery', elem_id="gallery",).style(grid=5,height=768,
121
  allow_preview=False, label = "retrieve Images")
122
  #gr.Dataframe(label='prompts for corresponding images')]
123
 
@@ -145,4 +156,5 @@ with gr.Blocks(css="custom.css") as demo:
145
  text_button.click(search, inputs=[inputs, search_func_name], outputs=outputs)
146
 
147
 
 
148
  demo.launch("0.0.0.0")
 
108
  text_button = gr.Button("Retrieve Images", elem_id="run_button")
109
  i = gr.Image(elem_id="result-image")
110
 
111
+ gr.Examples(
112
+ [
113
+ ["Chinese Traditional Culture", "lexica", "images/AbsoluteReality.png"],
114
+ ["trending digital art", "lexica", "images/waifu.png"],
115
+ ["beautiful home", "enterpix", "images/Cyberpunk_Anime.png"],
116
+ ["interior design of living room", "enterpix", "images/DreamShaper.png"],
117
+ ],
118
+ inputs = [inputs, search_func_name, i],
119
+ label = "Examples"
120
+ )
121
+
122
  with gr.Column():
123
  title = gr.Markdown(
124
  value="### Click on a Image in the gallery to select it, and the grid order will change",
 
128
  order_func_name = gr.Radio(choices=hash_func_name,
129
  value=hash_func_name[0], label="Order by", elem_id="order_radio")
130
 
131
+ outputs = gr.Gallery(lable='Output gallery', elem_id="gallery",).style(grid=5,height=768 - 128,
132
  allow_preview=False, label = "retrieve Images")
133
  #gr.Dataframe(label='prompts for corresponding images')]
134
 
 
156
  text_button.click(search, inputs=[inputs, search_func_name], outputs=outputs)
157
 
158
 
159
+
160
  demo.launch("0.0.0.0")