Spaces:
Running
Running
| import pickle | |
| _index = None | |
| def load_index(): | |
| global _index | |
| if _index is None: | |
| print("Loading index...") | |
| with open("data/index.pkl", "rb") as f: | |
| _index = pickle.load(f) | |
| print("Index loaded") | |
| return _index |