CollisonChat2 / app.py
Mattdoc99's picture
Update app.py
f932d87
raw
history blame
506 Bytes
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, text_color='black')