marinap commited on
Commit
c89095f
1 Parent(s): 194e5e6

smaller Gallery grid

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def find_topk(text):
32
 
33
  print('text', text)
34
 
35
- top_k = 20
36
 
37
  text_data = model_multi.preprocess_text(text)
38
  text_features, text_embedding = model_multi.encode_text(text_data, return_features=True)
@@ -91,7 +91,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
91
  prompt_box = gr.Textbox(label = 'Enter your prompt', lines = 3)
92
  btn_search = gr.Button("Find images")
93
 
94
- gallery = gr.Gallery().style(columns=5, rows=4, object_fit="contain", height="auto")
95
  btn_search.click(find_topk, inputs = prompt_box, outputs = gallery)
96
 
97
  if __name__ == "__main__":
 
32
 
33
  print('text', text)
34
 
35
+ top_k = 10
36
 
37
  text_data = model_multi.preprocess_text(text)
38
  text_features, text_embedding = model_multi.encode_text(text_data, return_features=True)
 
91
  prompt_box = gr.Textbox(label = 'Enter your prompt', lines = 3)
92
  btn_search = gr.Button("Find images")
93
 
94
+ gallery = gr.Gallery().style(columns=5, rows=2, object_fit="contain", height="auto")
95
  btn_search.click(find_topk, inputs = prompt_box, outputs = gallery)
96
 
97
  if __name__ == "__main__":