NER-Biomedical-PHI-Ensemble / config_utils.py
ajit
Initial commit
d154d66
raw
history blame
463 Bytes
import json
def write_config(configs,file_name='server_config.json'):
print(json.dumps(configs))
with open(file_name, 'w') as outfile:
json.dump(configs, outfile)
def read_config(file_name='server_config.json'):
try:
with open(file_name) as json_file:
data = json.load(json_file)
#print(data)
return data
except:
print("Unable to open config file:",file_name)
return {}