svjack commited on
Commit
bce7d5c
·
1 Parent(s): 49175d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -40,23 +40,23 @@ def lexica(prompt, limit_size = 128, ratio_size = 256 + 128):
40
  lex = list(map(lambda x: min_dim_to_size(x, ratio_size)[1], lex))
41
  return lex
42
 
43
- with gr.Blocks() as demo:
44
  with gr.Row():
45
  with gr.Tabs():
46
  with gr.Row():
47
  inputs = gr.Textbox(label = 'Enter prompt to search Lexica.art')
48
  #gr.Slider(label='Number of images ', minimum = 4, maximum = 20, step = 1, value = 4)]
49
- text_button = gr.Button("Retrieve Images").style(full_width=False)
50
- i = gr.Image()
51
  with gr.Tabs():
52
  #### Try to click on a image in the gallery, and the gallery order will changed
53
  with gr.Column():
54
  title = gr.Markdown(
55
  value="### Click on a Image in the gallery to select it, and the grid order will changed",
56
  visible=True,
57
- elem_id="selected_image",
58
  )
59
- outputs = gr.Gallery(lable='Output gallery').style(grid=3,height=768,
60
  allow_preview=False, label = "retrieve Images")
61
  #gr.Dataframe(label='prompts for corresponding images')]
62
 
 
40
  lex = list(map(lambda x: min_dim_to_size(x, ratio_size)[1], lex))
41
  return lex
42
 
43
+ with gr.Blocks("custom.css") as demo:
44
  with gr.Row():
45
  with gr.Tabs():
46
  with gr.Row():
47
  inputs = gr.Textbox(label = 'Enter prompt to search Lexica.art')
48
  #gr.Slider(label='Number of images ', minimum = 4, maximum = 20, step = 1, value = 4)]
49
+ text_button = gr.Button("Retrieve Images", elem_id="run_button")
50
+ i = gr.Image(elem_id="result-image")
51
  with gr.Tabs():
52
  #### Try to click on a image in the gallery, and the gallery order will changed
53
  with gr.Column():
54
  title = gr.Markdown(
55
  value="### Click on a Image in the gallery to select it, and the grid order will changed",
56
  visible=True,
57
+ elem_id="selected_model",
58
  )
59
+ outputs = gr.Gallery(lable='Output gallery', elem_id="gallery",).style(grid=3,height=768,
60
  allow_preview=False, label = "retrieve Images")
61
  #gr.Dataframe(label='prompts for corresponding images')]
62