Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ def construct_index(directory_path):
|
|
23 |
|
24 |
|
25 |
def ask_ai(question,api):
|
26 |
-
if api
|
27 |
-
|
28 |
index = GPTSimpleVectorIndex.load_from_disk('index.json')
|
29 |
response = index.query(question, response_mode="compact")
|
30 |
return response.response
|
|
|
23 |
|
24 |
|
25 |
def ask_ai(question,api):
|
26 |
+
if api == "":
|
27 |
+
os.environ["OPENAI_API_KEY"] = "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"
|
28 |
index = GPTSimpleVectorIndex.load_from_disk('index.json')
|
29 |
response = index.query(question, response_mode="compact")
|
30 |
return response.response
|