Update app.py
Browse files116 unmodified lines117118119120121122123124125126127128129130131132133134135136137138139140141142143144116 unmodified linestransforms.CenterCrop((384, 384)),])model_file = huggingface_hub.hf_hub_download(repo_id="RedRocket/JointTaggerProject",filename="JTP_PILOT-e4-vit_so400m_patch14_siglip_384.safetensors",subfolder="JTP_PILOT")model = timm.create_model("vit_so400m_patch14_siglip_384.webli",pretrained=False,num_classes=9083,) # type: VisionTransformersafetensors.torch.load_model(model, model_file)model.eval()tags_file = huggingface_hub.hf_hub_download(repo_id="RedRocket/JointTaggerProject",filename="tags.json",subfolder="JTP_PILOT")with open(tags_file, "r") as file:tags = json.load(file) # type: dictallowed_tags = tags.keys()116 unmodified lines117118119120121122123124125126127128129130131132116 unmodified linestransforms.CenterCrop((384, 384)),])model = timm.create_model("vit_so400m_patch14_siglip_384.webli",pretrained=False,num_classes=9083,) # type: VisionTransformersafetensors.torch.load_model(model, "JTP_PILOT-e4-vit_so400m_patch14_siglip_384.safetensors")model.eval()with open("tags.json", "r") as file:tags = json.load(file) # type: dictallowed_tags = tags.keys()
app.py+2-14