import os import yaml import json from pathlib import Path import streamlit as st from compliance_analysis import check_overall_compliance_ui def compliance_analysis(cards): dispositive_variables = check_overall_compliance_ui(cards) return dispositive_variables def load_yaml(file_path): with open(file_path, 'r') as file: return yaml.safe_load(file) def load_yaml_files_from_directory(directory_path): yaml_files = [] for file_name in os.listdir(directory_path): if file_name.endswith('.yaml'): file_path = os.path.join(directory_path, file_name) with open(file_path, 'r') as file: yaml_files.append(yaml.safe_load(file)) return yaml_files directories = { 'None': './examples', 'Template': './examples/cc_templates', 'Example Compliant Project ': './examples/compliant_project', 'Example Non-Compliant Project ': './examples/non-compliant_project' } def format_card_label(card): return card[0] # Streamlit app st.set_page_config(page_title="Compliance Cards", layout="wide") st.markdown( """