Text-to-Image
Diffusers
vietnam
sd
ViSD-TDNM / write_model_card.py
TDN-M's picture
Create write_model_card.py
632de33 verified
raw
history blame
No virus
832 Bytes
import json
# Nội dung của model card ở định dạng JSON
model_card = {
"model_name": "ViSD-TDNM",
"model_description": "Model tạo ảnh dựa trên ổn định Diffusion với checkpoint phiên bản 1.5.",
"task": "Tạo ảnh từ văn bản",
"data": "Tập dữ liệu đào tạo bao gồm các cặp văn bản-hình ảnh.",
"metrics": {"mAP": 0.85, "Precision": 0.92},
"checkpoint": {
"path": "path/to/your/checkpoint/file.ckpt",
"version": "1.5"
},
"tags": ["tạo ảnh", "ổn định Diffusion", "model tạo ảnh"]
}
# Đường dẫn đến file JSON để lưu
model_card_path = "model_card.json"
# Lưu model card vào file JSON
with open(model_card_path, "w") as file:
json.dump(model_card, file, indent=4)
print(f"Model card đã được lưu vào {model_card_path}")