I am building an image search engine using streamlit, where the results are displayed from image urls. When I run the code on my machine it works fine, but when deployed the images won’t display.
Steps to reproduce
Code snippet:
st.image([result.id for result in top_k_samples["matches"]], width=200)
@CarlosSerrano Here’s the majority of the code for more context.
import streamlit as st
import pinecone
from utils import get_text_embedding
...
pinecone.init(api_key=PINECONE_KEY, environment="us-east4-gcp") # app.pinecone.io
index_name = "clip-image-search"
index = pinecone.Index(index_name=index_name)
text_query = st.text_input("Search for images", "A cat in the rain")
number_of_results = st.slider("Number of results", 1, 20, 5)
query_vector = get_text_embedding(text_query)
top_k_samples = index.query(
vector=query_vector, top_k=number_of_results, include_values=False
)
st.image([result.id for result in top_k_samples["matches"]], width=200)