File size: 487 Bytes
170337d
 
91b8fd6
170337d
182fbe6
67ffd8d
170337d
29c9779
888613e
29c9779
 
 
 
e64f9f0
d7122ff
182fbe6
a709c80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)