Spaces:
Runtime error
Runtime error
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}") |