Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,14 +57,14 @@ def construct_index(directory_path):
|
|
57 |
|
58 |
index.save_to_disk('index.json')
|
59 |
|
60 |
-
with open('llm_predictor.pkl', 'wb') as f:
|
61 |
-
pickle.dump(llm_predictor, f)
|
62 |
|
63 |
return index
|
64 |
|
65 |
def ask_ai(query):
|
66 |
-
with open('llm_predictor.pkl', 'rb') as f:
|
67 |
-
llm_predictor = pickle.load(f)
|
68 |
|
69 |
index = GPTSimpleVectorIndex.load_from_disk('index.json', llm_predictor=llm_predictor)
|
70 |
response = index.query(query, response_mode="compact")
|
|
|
57 |
|
58 |
index.save_to_disk('index.json')
|
59 |
|
60 |
+
#with open('llm_predictor.pkl', 'wb') as f:
|
61 |
+
#pickle.dump(llm_predictor, f)
|
62 |
|
63 |
return index
|
64 |
|
65 |
def ask_ai(query):
|
66 |
+
#with open('llm_predictor.pkl', 'rb') as f:
|
67 |
+
#llm_predictor = pickle.load(f)
|
68 |
|
69 |
index = GPTSimpleVectorIndex.load_from_disk('index.json', llm_predictor=llm_predictor)
|
70 |
response = index.query(query, response_mode="compact")
|