Codebert-Repo-Analyzer / unpickle.py
heaversm's picture
build a github similarity score retriever - no streamlit integration yet
6c5b95d
raw
history blame
444 Bytes
import pickle
# Define the path to the pickle file
pickle_file_path = 'codesearchdb.pickle'
# Load the pickle file
with open(pickle_file_path, 'rb') as file:
data = pickle.load(file)
# Save the contents to a new file (for example, a JSON file)
import json
json_file_path = 'codesearchdb.json'
with open(json_file_path, 'w') as json_file:
json.dump(data, json_file, indent=4)
print(f"Contents have been saved to {json_file_path}")