Skip to content

Commit c3b9e65

Browse files
authored
Create Project object local instead of calling API after create project (#411)
1 parent ffd70b3 commit c3b9e65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roboflow/__init__.py

Lines changed: 1 addition & 1 deletion
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.2.6"
18+
__version__ = "1.2.7"
1919

2020

2121
def check_key(api_key, model, notebook, num_retries=0):

roboflow/core/workspace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def create_project(self, project_name, project_type, project_license, annotation
103103
Args:
104104
project_name (str): name of the project
105105
project_type (str): type of the project
106-
project_license (str): license of the project (set to `private` for private projects, only available for paid customers)
106+
project_license (str): license of the project (set to `Private` for private projects, only available for paid customers)
107107
annotation (str): annotation of the project
108108
109109
Returns:
@@ -123,7 +123,7 @@ def create_project(self, project_name, project_type, project_license, annotation
123123
if "error" in r.json().keys():
124124
raise RuntimeError(r.json()["error"])
125125

126-
return self.project(r.json()["id"].split("/")[-1])
126+
return Project(self.__api_key, r.json(), self.model_format)
127127

128128
def clip_compare(self, dir: str = "", image_ext: str = ".png", target_image: str = "") -> List[dict]:
129129
"""

0 commit comments

Comments
 (0)