Spaces:
Running
Running
Update app.py
Browse files
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
|
103 |
-
-
|
104 |
-
-
|
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="
|
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)
|