Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ file_path = 'response_metropol.json'
|
|
19 |
data = pd.read_json(file_path)
|
20 |
data.head()
|
21 |
documents = [Document(text=row['values'],metadata={"filename": row['file_name'], "description":row['file_description']},) for index, row in data.iterrows()]
|
22 |
-
os.environ["OPENAI_API_KEY"] = os.getenv(api_key_openai)
|
23 |
#pd.set_option("display.max_colwidth", -1)
|
24 |
# build index
|
25 |
index = VectorStoreIndex.from_documents(documents)
|
|
|
19 |
data = pd.read_json(file_path)
|
20 |
data.head()
|
21 |
documents = [Document(text=row['values'],metadata={"filename": row['file_name'], "description":row['file_description']},) for index, row in data.iterrows()]
|
22 |
+
os.environ["OPENAI_API_KEY"] = os.getenv('api_key_openai')
|
23 |
#pd.set_option("display.max_colwidth", -1)
|
24 |
# build index
|
25 |
index = VectorStoreIndex.from_documents(documents)
|