Update app.py
Browse files
app.py
CHANGED
@@ -59,12 +59,14 @@ def detect_combined(image):
|
|
59 |
total_nestle = sum(nestle_class_count.values())
|
60 |
|
61 |
# ========== [2] OWLv2: Deteksi Kompetitor ==========
|
|
|
62 |
headers = {
|
63 |
"Authorization": "Basic " + OWLV2_API_KEY,
|
64 |
}
|
65 |
data = {
|
66 |
"prompts": OWLV2_PROMPTS,
|
67 |
-
"model": "owlv2"
|
|
|
68 |
}
|
69 |
with open(temp_path, "rb") as f:
|
70 |
files = {"image": f}
|
|
|
59 |
total_nestle = sum(nestle_class_count.values())
|
60 |
|
61 |
# ========== [2] OWLv2: Deteksi Kompetitor ==========
|
62 |
+
|
63 |
headers = {
|
64 |
"Authorization": "Basic " + OWLV2_API_KEY,
|
65 |
}
|
66 |
data = {
|
67 |
"prompts": OWLV2_PROMPTS,
|
68 |
+
"model": "owlv2",
|
69 |
+
"confidence": 0.25 # Set confidence threshold to 0.25
|
70 |
}
|
71 |
with open(temp_path, "rb") as f:
|
72 |
files = {"image": f}
|