diff --git a/docs/foundation/gaze.md b/docs/foundation/gaze.md index f90d37678..3ad3d44b9 100644 --- a/docs/foundation/gaze.md +++ b/docs/foundation/gaze.md @@ -26,10 +26,10 @@ import requests import os IMG_PATH = "image.jpg" -API_KEY = os.environ["API_KEY"] +ROBOFLOW_API_KEY = os.environ["ROBOFLOW_API_KEY"] DISTANCE_TO_OBJECT = 1000 # mm HEIGHT_OF_HUMAN_FACE = 250 # mm -GAZE_DETECTION_URL = "http://127.0.0.1:9001/gaze/gaze_detection?api_key=" + API_KEY +GAZE_DETECTION_URL = "http://127.0.0.1:9001/gaze/gaze_detection?api_key=" + ROBOFLOW_API_KEY def detect_gazes(frame: np.ndarray): img_encode = cv2.imencode(".jpg", frame)[1] @@ -37,7 +37,7 @@ def detect_gazes(frame: np.ndarray): resp = requests.post( GAZE_DETECTION_URL, json={ - "api_key": API_KEY, + "api_key": ROBOFLOW_API_KEY, "image": {"type": "base64", "value": img_base64.decode("utf-8")}, }, ) diff --git a/examples/gaze-detection/README.md b/examples/gaze-detection/README.md index fd452fdba..50280b0e6 100644 --- a/examples/gaze-detection/README.md +++ b/examples/gaze-detection/README.md @@ -13,12 +13,12 @@ git clone https://github.com/roboflow/inference cd inference/examples/gaze-detection ``` -Next, set up a Python environment and install the required project dependencies: +Next, set up a Python environment and install the required project dependencies (this assumes running these bash commands from the above terminal window install): ```bash python3 -m venv venv source venv/bin/activate -pip install -r requirements.txt +pip install -r ../../requirements/_requirements.txt ``` Next, set up a Roboflow Inference Docker container. This Docker container will manage inference for the gaze detection system. [Learn how to set up an Inference Docker container](https://inference.roboflow.com/quickstart/docker/). diff --git a/examples/gaze-detection/gaze.py b/examples/gaze-detection/gaze.py index 3aca76f78..ad9129947 100644 --- a/examples/gaze-detection/gaze.py +++ b/examples/gaze-detection/gaze.py @@ -6,10 +6,10 @@ import os IMG_PATH = "image.jpg" -API_KEY = os.environ["API_KEY"] +ROBOFLOW_API_KEY = os.environ["ROBOFLOW_API_KEY"] DISTANCE_TO_OBJECT = 1000 # mm HEIGHT_OF_HUMAN_FACE = 250 # mm -GAZE_DETECTION_URL = "http://127.0.0.1:9001/gaze/gaze_detection?api_key=" + API_KEY +GAZE_DETECTION_URL = "http://127.0.0.1:9001/gaze/gaze_detection?api_key=" + ROBOFLOW_API_KEY def detect_gazes(frame: np.ndarray): @@ -18,7 +18,7 @@ def detect_gazes(frame: np.ndarray): resp = requests.post( GAZE_DETECTION_URL, json={ - "api_key": API_KEY, + "api_key": ROBOFLOW_API_KEY, "image": {"type": "base64", "value": img_base64.decode("utf-8")}, }, )