Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def construct_index(directory_path):
|
|
48 |
index = GPTSimpleVectorIndex(
|
49 |
documents, llm_predictor=llm_predictor, prompt_helper=prompt_helper
|
50 |
)
|
51 |
-
|
52 |
index.save_to_disk('index.json')
|
53 |
|
54 |
return index
|
|
|
48 |
index = GPTSimpleVectorIndex(
|
49 |
documents, llm_predictor=llm_predictor, prompt_helper=prompt_helper
|
50 |
)
|
51 |
+
index.registry.add_type_to_struct(1, {"answer": str, "question": str})
|
52 |
index.save_to_disk('index.json')
|
53 |
|
54 |
return index
|