SajjadAyoubi commited on
Commit
cd19d7a
·
1 Parent(s): b1ec3cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -13,7 +13,7 @@ links = np.load('data.npy', allow_pickle=True)
13
 
14
 
15
  def get_html(url_list):
16
- html = "<div style='margin-top: 50px; max-width: 1200px; display: flex; flex-wrap: wrap; justify-content: space-evenly'>"
17
  for url in url_list:
18
  html2 = f"<img style='height: 200px; margin: 2px' src='{escape(url)}'>"
19
  html = html + html2
@@ -29,7 +29,11 @@ def image_search(query, top_k=8):
29
 
30
 
31
  description = '''
32
- # Semantic image search :)
 
 
 
 
33
  '''
34
 
35
 
@@ -59,7 +63,7 @@ def main():
59
 
60
  st.sidebar.markdown(description)
61
  _, c, _ = st.columns((1, 3, 1))
62
- query = c.text_input('Search text', value='مرغ دریای')
63
  if len(query) > 0:
64
  results = image_search(query)
65
  st.markdown(get_html(results), unsafe_allow_html=True)
 
13
 
14
 
15
  def get_html(url_list):
16
+ html = "<div style='margin-top: 50px; max-width: 1000px; display: flex; flex-wrap: wrap; justify-content: space-evenly'>"
17
  for url in url_list:
18
  html2 = f"<img style='height: 200px; margin: 2px' src='{escape(url)}'>"
19
  html = html + html2
 
29
 
30
 
31
  description = '''
32
+ # Persian (fa) image search
33
+ - Enter your query and hit enter
34
+
35
+ ## Built with [CLIP-fa](https://github.com/sajjjadayobi/CLIPfa) model
36
+ - Made with ❤️ in my basement
37
  '''
38
 
39
 
 
63
 
64
  st.sidebar.markdown(description)
65
  _, c, _ = st.columns((1, 3, 1))
66
+ query = c.text_input('Search Box', value='گل صورتی')
67
  if len(query) > 0:
68
  results = image_search(query)
69
  st.markdown(get_html(results), unsafe_allow_html=True)