Autobloger-AI / utils /utils.py
Skomrakus's picture
Create utils/utils.py
b61548a verified
raw
history blame contribute delete
368 Bytes
import json
def load_config():
with open("config.json", "r") as f:
return json.load(f)
def load_data(data_path):
with open(data_path, "r") as f:
return [line.strip() for line in f.readlines()]
def save_results(results, output_path):
with open(output_path, "w") as f:
for result in results:
f.write(str(result) + "\n")