awacke1 commited on
Commit
74d06a4
·
1 Parent(s): ca36cff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -94,14 +94,12 @@ def image_search(query, corpus, n_results=24):
94
  description = """
95
  # Semantic image search
96
  **Enter your query and hit enter**
97
- *Built with OpenAI's [CLIP](https://openai.com/blog/clip/) model, 🤗 Hugging Face's [transformers library](https://huggingface.co/transformers/), [Streamlit](https://streamlit.io/), 25k images from [Unsplash](https://unsplash.com/) and 8k images from [The Movie Database (TMDB)](https://www.themoviedb.org/)*
98
- *Inspired by [Unsplash Image Search](https://github.com/haltakov/natural-language-image-search) from Vladimir Haltakov and [Alph, The Sacred River](https://github.com/thoppe/alph-the-sacred-river) from Travis Hoppe*
99
  """
100
 
101
  howto = """
102
- - Click on an image to use it as a query and find similar images
103
- - Several queries, including one based on an image, can be combined (use "**;**" as a separator)
104
- - If the input includes "**EXCLUDING**", the part right of it will be used as a negative query
105
  """
106
 
107
 
@@ -147,7 +145,7 @@ def main():
147
  if "query" in st.session_state:
148
  query = c.text_input("", value=st.session_state["query"])
149
  else:
150
- query = c.text_input("", value="clouds at sunset")
151
  corpus = st.radio("", ["Unsplash", "Movies"])
152
  if len(query) > 0:
153
  results = image_search(query, corpus)
 
94
  description = """
95
  # Semantic image search
96
  **Enter your query and hit enter**
 
 
97
  """
98
 
99
  howto = """
100
+ - Click image to find similar images
101
+ - Use "**;**" to combine multiple queries)
102
+ - Use "**EXCLUDING**", to exclude a query
103
  """
104
 
105
 
 
145
  if "query" in st.session_state:
146
  query = c.text_input("", value=st.session_state["query"])
147
  else:
148
+ query = c.text_input("", value="Lighthouse with reflections")
149
  corpus = st.radio("", ["Unsplash", "Movies"])
150
  if len(query) > 0:
151
  results = image_search(query, corpus)