SajjadAyoubi commited on
Commit
20bb944
·
1 Parent(s): 1710a12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -22,10 +22,10 @@ links = np.load('data.npy', allow_pickle=True)
22
 
23
 
24
 
25
- def get_html(url_list, height=180):
26
- html = "<div style='margin-top: 20px; max-width: 1200px; display: flex; flex-wrap: wrap; justify-content: space-evenly'>"
27
  for url in url_list:
28
- html2 = f"<img style='height: {height}px; margin: 5px' src='{escape(url)}'>"
29
  html = html + html2
30
  html += "</div>"
31
  return html
@@ -79,6 +79,7 @@ def main():
79
  _, c, _ = st.columns((1, 3, 1))
80
  query = c.text_input('Search text', value='مرغ دریای')
81
  if len(query) > 0:
 
82
  results = image_search(query)
83
  st.markdown(get_html(results), unsafe_allow_html=True)
84
 
 
22
 
23
 
24
 
25
+ def get_html(url_list, height=200):
26
+ html = "<div style='margin-top: 50px; max-width: 1200px; display: flex; flex-wrap: wrap; justify-content: space-evenly'>"
27
  for url in url_list:
28
+ html2 = f"<img style='height: {height}px; margin: 2px' src='{escape(url)}'>"
29
  html = html + html2
30
  html += "</div>"
31
  return html
 
79
  _, c, _ = st.columns((1, 3, 1))
80
  query = c.text_input('Search text', value='مرغ دریای')
81
  if len(query) > 0:
82
+ st.text('test text')
83
  results = image_search(query)
84
  st.markdown(get_html(results), unsafe_allow_html=True)
85