muhammadsalmanalfaridzi commited on
Commit
4151705
·
verified ·
1 Parent(s): d69c0c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -83,7 +83,7 @@ def detect_combined(image):
83
  nestle_boxes.append((pred['x'], pred['y'], pred['width'], pred['height']))
84
 
85
  # ===== CountGD Detection =====
86
- url = "https://api.landing.ai/v1/tools/agentic-object-detection"
87
  headers = {"Authorization": f"Basic {COUNTGD_API_KEY}"}
88
  competitor_boxes = []
89
  COUNTGD_PROMPTS = ["beverage", "cans", "bottle", "boxed milk", "milk"]
@@ -91,7 +91,7 @@ def detect_combined(image):
91
  for prompt in COUNTGD_PROMPTS:
92
  with open(temp_path, "rb") as f:
93
  files = {"image": f}
94
- data = {"prompts": [prompt], "model": "agentic"}
95
  response = requests.post(url, files=files, data=data, headers=headers)
96
  result = response.json()
97
 
 
83
  nestle_boxes.append((pred['x'], pred['y'], pred['width'], pred['height']))
84
 
85
  # ===== CountGD Detection =====
86
+ url = "https://api.landing.ai/v1/tools/text-to-object-detection"
87
  headers = {"Authorization": f"Basic {COUNTGD_API_KEY}"}
88
  competitor_boxes = []
89
  COUNTGD_PROMPTS = ["beverage", "cans", "bottle", "boxed milk", "milk"]
 
91
  for prompt in COUNTGD_PROMPTS:
92
  with open(temp_path, "rb") as f:
93
  files = {"image": f}
94
+ data = {"prompts": [prompt], "model": "owlv2"}
95
  response = requests.post(url, files=files, data=data, headers=headers)
96
  result = response.json()
97