import os import re import json import networkx as nx import matplotlib.pyplot as plt # ---------------- DATA EXTRACTION ---------------- def parse_page(page_name): """Extract model and lora names from the given HTML page.""" with open(page_name, 'r', encoding='utf-8') as f: html_content = f.read() return extract_data_from_html(html_content) def extract_data_from_html(html_content): """Extract specific data from the embedded JSON within the HTML content.""" pattern = r'id="__NEXT_DATA__" type="application/json">(.*?)