1repo_id = "Jiahao123/tongue_segmentation_attenunet_YC_split"
2
3# Download files from Hugging Face
4json_path = hf_hub_download(repo_id=repo_id, filename="attenunet_architecture.json")
5weights_path = hf_hub_download(repo_id=repo_id, filename="attenunet_29.weights.h5")
6
7# Load architecture
8with open(json_path, "r") as json_file:
9 model_json = json_file.read()
10test_model = model_from_json(model_json)
11
12# Load weights
13test_model.load_weights(weights_path)