Skip to content

Commit c1755df

Browse files
authored
Fix dst_project_meta updating; Add copy_annotations option to modal (#24)
1 parent 4e33e9f commit c1755df

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
venv
44
secret_debug.env
55
supervisely_lib
6+
supervisely
67
src/debug
78
__pycache__/
8-
.DS_Store
9+
.DS_Store

config.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"data operations"
1010
],
1111
"description": "Creates images project from video project",
12-
"docker_image": "supervisely/data-operations:6.73.377",
13-
"min_instance_version": "6.12.46",
12+
"docker_image": "supervisely/data-operations:6.73.397",
13+
"min_instance_version": "6.13.8",
1414
"entrypoint": "python -m uvicorn src.main:app --host 0.0.0.0 --port 8000",
1515
"port": 8000,
1616
"modal_template": "src/modal.html",
@@ -21,7 +21,8 @@
2121
"batchSize": 32,
2222
"sampleResultFrames": false,
2323
"framesStep": 10,
24-
"run": true
24+
"run": true,
25+
"copyAnnotations": true
2526
},
2627
"task_location": "workspace_tasks",
2728
"icon": "https://i.imgur.com/P6BjsxA.png",

dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
supervisely==6.73.377
1+
supervisely==6.73.397

src/globals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,5 @@
7676
raise ValueError(
7777
"Nothing to convert, there are no tags and classes in project {!r}".format(project.name)
7878
)
79+
80+
copy_annotations = os.getenv("modal.state.copyAnnotations", "true").lower() in ("true", "1", "t")

src/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
sampling_widget = Sampling(
99
g.project_id,
10+
copy_annotations=g.copy_annotations,
1011
)
1112

1213

src/modal.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,8 @@
4343
<b style="font-weight: 500; padding: 0; font-size: 14px;">Run transformation</b>
4444
<span style="color: #999; font-size: 12px;">(if unchecked, only the configuration will be saved)</span>
4545
</el-checkbox>
46-
</div>
46+
47+
<el-checkbox v-if="context.projectId" v-model="state.copyAnnotations" style="margin-top: 10px; margin-left: 0px;">
48+
<b style="font-weight: 500; padding: 0; font-size: 14px;">Copy annotations</b>
49+
</el-checkbox>
50+
</div>

0 commit comments

Comments
 (0)