Corey Mcmahon
Initial indexing (9 pages, approx 2mb index)
cb2af73
raw
history blame contribute delete
No virus
324 Bytes
import gradio as gr
from gpt_index import GPTSimpleVectorIndex
def chatbot(input_text):
index = GPTSimpleVectorIndex.load_from_disk('index.json')
response = index.query(input_text, response_mode="compact")
return response.response
iface = gr.Interface(fn=chatbot, inputs="text", outputs="text")
iface.launch()