Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from llama_index import SimpleDirectoryReader, GPTListIndex, readers, GPTSimpleV
|
|
7 |
os.environ["OPENAI_API_KEY"] = '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'
|
8 |
|
9 |
def gradio_ask_ai(user_input):
|
10 |
-
index = GPTSimpleVectorIndex.load_from_disk('
|
11 |
query = user_input
|
12 |
response = index.query(query)
|
13 |
return response.response
|
|
|
7 |
os.environ["OPENAI_API_KEY"] = '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'
|
8 |
|
9 |
def gradio_ask_ai(user_input):
|
10 |
+
index = GPTSimpleVectorIndex.load_from_disk('index.json')
|
11 |
query = user_input
|
12 |
response = index.query(query)
|
13 |
return response.response
|