Spaces:
Sleeping
Sleeping
Commit
·
dd5ffd6
1
Parent(s):
a70fa16
feat
Browse files- app.py +2 -1
- 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-
|
| 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
|