import json import streamlit as st from gpt_index import GPTSimpleVectorIndex # Load the index from disk index = GPTSimpleVectorIndex.load_from_disk('index-4.json') # Define the app layout st.title('Ask Patrick Collison Anything') header = st.container() with header: st.image('https://c1.thejournal.ie/media/2012/02/PCI-3-PATRICK-COLLISS00078736-752x501.jpg', width=376) query = st.text_input('Enter a query:') if query: result = index.query(query) st.write(result)