Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ model_version = int(os.getenv("ROBOFLOW_MODEL_VERSION"))
|
|
| 23 |
|
| 24 |
# DINO-X Config
|
| 25 |
DINOX_API_KEY = os.getenv("DINO_X_API_KEY")
|
| 26 |
-
DINOX_PROMPT = "beverage . bottle . cans .
|
| 27 |
|
| 28 |
# Inisialisasi Model
|
| 29 |
rf = Roboflow(api_key=rf_api_key)
|
|
@@ -108,7 +108,7 @@ def detect_combined(image):
|
|
| 108 |
x1, y1, x2, y2 = comp['box']
|
| 109 |
|
| 110 |
# Define a list of target classes to rename
|
| 111 |
-
unclassified_classes = ["beverage", "cans", "bottle", "
|
| 112 |
|
| 113 |
# Normalize the class name to be case-insensitive and check if it's in the unclassified list
|
| 114 |
display_name = "unclassified" if any(class_name in comp['class'].lower() for class_name in unclassified_classes) else comp['class']
|
|
|
|
| 23 |
|
| 24 |
# DINO-X Config
|
| 25 |
DINOX_API_KEY = os.getenv("DINO_X_API_KEY")
|
| 26 |
+
DINOX_PROMPT = "beverage . bottle . cans . mixed box" # Customize sesuai produk kompetitor : food . drink
|
| 27 |
|
| 28 |
# Inisialisasi Model
|
| 29 |
rf = Roboflow(api_key=rf_api_key)
|
|
|
|
| 108 |
x1, y1, x2, y2 = comp['box']
|
| 109 |
|
| 110 |
# Define a list of target classes to rename
|
| 111 |
+
unclassified_classes = ["beverage", "cans", "bottle", "mixed box"]
|
| 112 |
|
| 113 |
# Normalize the class name to be case-insensitive and check if it's in the unclassified list
|
| 114 |
display_name = "unclassified" if any(class_name in comp['class'].lower() for class_name in unclassified_classes) else comp['class']
|