code: import streamlit as st
  from llama_index import VectorStoreIndex
  from llama_index.vector_stores import ChromaVectorStore
  import chromadb
  
  st.title('Precident')
  
  # load and prime the index
  db2 = chromadb.PersistentClient(path="./chroma_db")
  chroma_collection = db2.get_or_create_collection("quickstart")
  vector_store = ChromaVectorStore(chroma_collection=chroma_collection)
  index = VectorStoreIndex.from_vector_store(
      vector_store,
  )
  query_engine = index.as_query_engine()
  
  # add search bar
  search = st.text_input('Search', 'Enter query here')
  response = query_engine.query(search)
  st.write(response)
  
apis: llama_index.VectorStoreIndex.from_vector_store llama_index.vector_stores.ChromaVectorStore
extract_api: [((137, 158), 'streamlit.title', 'st.title', (['"""Precident"""'], {}), "('Precident')\n", (145, 158), True, 'import streamlit as st\n'), ((193, 238), 'chromadb.PersistentClient', 'chromadb.PersistentClient', ([], {'path': '"""./chroma_db"""'}), "(path='./chroma_db')\n", (218, 238), False, 'import chromadb\n'), ((317, 371), 'llama_index.vector_stores.ChromaVectorStore', 'ChromaVectorStore', ([], {'chroma_collection': 'chroma_collection'}), '(chroma_collection=chroma_collection)\n', (334, 371), False, 'from llama_index.vector_stores import ChromaVectorStore\n'), ((380, 428), 'llama_index.VectorStoreIndex.from_vector_store', 'VectorStoreIndex.from_vector_store', (['vector_store'], {}), '(vector_store)\n', (414, 428), False, 'from llama_index import VectorStoreIndex\n'), ((502, 545), 'streamlit.text_input', 'st.text_input', (['"""Search"""', '"""Enter query here"""'], {}), "('Search', 'Enter query here')\n", (515, 545), True, 'import streamlit as st\n'), ((584, 602), 'streamlit.write', 'st.write', (['response'], {}), '(response)\n', (592, 602), True, 'import streamlit as st\n')]