Skip to content

Commit

Permalink
check if dataset is None
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed May 15, 2024
1 parent 6619a85 commit 571a6e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
if project is None:
raise Exception(f"Project with id={g.project_id} not found")
labeling_interface = f.get_labeling_interface(project)
dataset = None
if g.dataset_id:
dataset = g.api.dataset.get_info_by_id(g.dataset_id)
else:
if dataset is None:
dataset = g.api.dataset.create(project.id, g.dataset_name, change_name_if_conflict=True)
g.dataset_id = dataset.id
g.project_modality = project.type
Expand Down

0 comments on commit 571a6e2

Please sign in to comment.