TeresaK's picture
upload version 2 (#2)
d064c89 verified
raw
history blame contribute delete
448 Bytes
import json
from pathlib import Path
import streamlit as st
def load_json(file_path: Path) -> dict | list:
with open(file_path, "r") as f:
return json.load(f)
def save_json(file_path: Path, data: dict | list) -> None:
with open(file_path, "w") as f:
json.dump(data, f, indent=4)
def load_css(file_name) -> None:
with open(file_name) as f:
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)