-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated API_KEY to ROBOFLOW_API_KEY for clarity #202
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,10 @@ | |
import os | ||
|
||
IMG_PATH = "image.jpg" | ||
API_KEY = os.environ["API_KEY"] | ||
ROBOFLOW_API_KEY = os.environ["ROBOFLOW_API_KEY"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This value is fine, as we also allow it in other places as an alternative for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use |
||
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")}, | ||
}, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested that but I was always thinking that for gaze to work we need also
../../requirements/requirements.gaze.txt
- at least this is suggested by setup.py extras that we created to build libsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, only these are required in
gaze.py
:We can assume the user is installing inference, overall, and have them setup the base
_requirements.txt
. In the future, we can decide to scope to individual examples.