Skip to content

Commit 1da9a6b

Browse files
authored
Merge pull request #146 from roboflow/use-propper-env-vars-for-inference-endpoints
use OBJECT_DETECTION_URL config value rather than hardcoded prod url for inference
2 parents e6155be + 42cf280 commit 1da9a6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

roboflow/models/object_detection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import wget
1616
from PIL import Image
1717

18-
from roboflow.config import API_URL, OBJECT_DETECTION_MODEL
18+
from roboflow.config import API_URL, OBJECT_DETECTION_MODEL, OBJECT_DETECTION_URL
1919
from roboflow.util.image_utils import check_image_url
2020
from roboflow.util.prediction import PredictionGroup
2121
from roboflow.util.versions import (
@@ -80,7 +80,7 @@ def __init__(
8080

8181
# local needs to be passed from Project
8282
if local is None:
83-
self.base_url = "https://detect.roboflow.com/"
83+
self.base_url = OBJECT_DETECTION_URL + "/"
8484
else:
8585
print("initalizing local object detection model hosted at :" + local)
8686
self.base_url = local
@@ -515,7 +515,7 @@ def __generate_url(
515515
# Reassign parameters if any parameters are changed
516516
if local is not None:
517517
if not local:
518-
self.base_url = "https://detect.roboflow.com/"
518+
self.base_url = OBJECT_DETECTION_URL + "/"
519519
else:
520520
self.base_url = "http://localhost:9001/"
521521

0 commit comments

Comments
 (0)