Skip to content

Commit dafeb44

Browse files
committed
remove load api key from env
1 parent 098d96f commit dafeb44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

roboflow/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from roboflow.models import CLIPModel, GazeModel # noqa: F401
1616
from roboflow.util.general import write_line
1717

18-
__version__ = "1.1.35"
18+
__version__ = "1.1.36"
1919

2020

2121
def check_key(api_key, model, notebook, num_retries=0):
@@ -210,6 +210,7 @@ def __init__(
210210
self.api_key = api_key
211211
if self.api_key is None:
212212
self.api_key = load_roboflow_api_key()
213+
213214

214215
self.model_format = model_format
215216
self.notebook = notebook
@@ -239,14 +240,13 @@ def workspace(self, the_workspace=None):
239240
the_workspace = self.current_workspace
240241

241242
if self.api_key: # Check if api_key was passed during __init__
242-
workspace_api_key = load_roboflow_api_key(the_workspace)
243-
api_key = workspace_api_key or self.api_key
243+
api_key = self.api_key
244244
list_projects = rfapi.get_workspace(api_key, the_workspace)
245245
return Workspace(list_projects, api_key, the_workspace, self.model_format)
246246

247247
elif self.api_key in DEMO_KEYS:
248248
return Workspace({}, self.api_key, the_workspace, self.model_format)
249-
249+
250250
else:
251251
raise ValueError("A valid API key must be provided.")
252252

0 commit comments

Comments
 (0)