yifehuang97 commited on
Commit
dd5ffd6
·
1 Parent(s): a70fa16
Files changed (2) hide show
  1. app.py +2 -1
  2. examples/boat-1.jpg +3 -0
app.py CHANGED
@@ -19,7 +19,7 @@ def load_model():
19
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
20
 
21
  # Load model - change path for HF Spaces
22
- model_id = "yifehuang97/CountEX-KC-v2" # Change to your HF model repo
23
  model = CountEX.from_pretrained(model_id, token=os.environ.get("HF_TOKEN"))
24
  model = model.to(torch.bfloat16)
25
  model = model.to(device)
@@ -382,6 +382,7 @@ def create_demo():
382
  ["examples/strawberry.jpg", "strawberry and blueberry.", "strawberry."],
383
  ["examples/strawberry2.jpg", "strawberry and blueberry.", "strawberry."],
384
  ["examples/women.jpg", "person.", "woman."],
 
385
  ],
386
  inputs=[input_image, pos_caption, neg_caption],
387
  outputs=[output_image, count_output],
 
19
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
20
 
21
  # Load model - change path for HF Spaces
22
+ model_id = "yifehuang97/CountEX-KC-v3" # Change to your HF model repo
23
  model = CountEX.from_pretrained(model_id, token=os.environ.get("HF_TOKEN"))
24
  model = model.to(torch.bfloat16)
25
  model = model.to(device)
 
382
  ["examples/strawberry.jpg", "strawberry and blueberry.", "strawberry."],
383
  ["examples/strawberry2.jpg", "strawberry and blueberry.", "strawberry."],
384
  ["examples/women.jpg", "person.", "woman."],
385
+ ["examples/boat-1.jpg", "boat.", "blue boat."],
386
  ],
387
  inputs=[input_image, pos_caption, neg_caption],
388
  outputs=[output_image, count_output],
examples/boat-1.jpg ADDED

Git LFS Details

  • SHA256: cfd2a080a62d25a0969265a74b5b616b4a34afa468fc625aa949552259cf6e3a
  • Pointer size: 131 Bytes
  • Size of remote file: 328 kB