Commit
·
22bf258
1
Parent(s):
46c271a
Fix handler
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
|
| 2 |
import os
|
| 3 |
from typing import Dict, List, Any
|
|
|
|
| 4 |
from groundingdino.util.inference import load_model, load_image, predict, annotate
|
| 5 |
|
| 6 |
HOME = os.getcwd()
|
| 7 |
-
|
|
|
|
| 8 |
WEIGHTS_PATH = os.path.join(HOME, "weights", "groundingdino_swint_ogc.pth")
|
| 9 |
|
| 10 |
class EndpointHandler():
|
|
|
|
| 1 |
|
| 2 |
import os
|
| 3 |
from typing import Dict, List, Any
|
| 4 |
+
import groundingdino
|
| 5 |
from groundingdino.util.inference import load_model, load_image, predict, annotate
|
| 6 |
|
| 7 |
HOME = os.getcwd()
|
| 8 |
+
PACKAGE_HOME = groundingdino.__file__
|
| 9 |
+
CONFIG_PATH = os.path.join(PACKAGE_HOME, "config", "GroundingDINO_SwinT_OGC.py")
|
| 10 |
WEIGHTS_PATH = os.path.join(HOME, "weights", "groundingdino_swint_ogc.pth")
|
| 11 |
|
| 12 |
class EndpointHandler():
|