Browse Source

Merge pull request #2056 from doccano/enhancement/1426

Trigger auto labeling automatically
pull/2065/head
Hiroki Nakayama 2 years ago
committed by GitHub
parent
commit
c27ce7128c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 22 deletions
  1. 7
      frontend/pages/projects/_id/image-captioning/index.vue
  2. 7
      frontend/pages/projects/_id/image-classification/index.vue
  3. 9
      frontend/pages/projects/_id/intent-detection-and-slot-filling/index.vue
  4. 7
      frontend/pages/projects/_id/object-detection/index.vue
  5. 7
      frontend/pages/projects/_id/segmentation/index.vue
  6. 7
      frontend/pages/projects/_id/sequence-labeling/index.vue
  7. 7
      frontend/pages/projects/_id/sequence-to-sequence/index.vue
  8. 7
      frontend/pages/projects/_id/speech-to-text/index.vue
  9. 6
      frontend/pages/projects/_id/text-classification/index.vue

7
frontend/pages/projects/_id/image-captioning/index.vue

@ -138,9 +138,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.image.id)
async enableAutoLabeling(val) {
if (val && !this.image.isConfirmed) {
await this.autoLabel(this.image.id)
await this.list(this.image.id)
}
}
},

7
frontend/pages/projects/_id/image-classification/index.vue

@ -141,9 +141,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.image.id)
async enableAutoLabeling(val) {
if (val && !this.image.isConfirmed) {
await this.autoLabel(this.image.id)
await this.list(this.image.id)
}
}
},

9
frontend/pages/projects/_id/intent-detection-and-slot-filling/index.vue

@ -120,7 +120,14 @@ export default {
},
watch: {
'$route.query': '$fetch'
'$route.query': '$fetch',
async enableAutoLabeling(val) {
if (val && !this.doc.isConfirmed) {
await this.autoLabel(this.doc.id)
await this.listSpan(this.doc.id)
await this.listCategory(this.doc.id)
}
}
},
async created() {

7
frontend/pages/projects/_id/object-detection/index.vue

@ -201,9 +201,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.image.id)
async enableAutoLabeling(val) {
if (val && !this.image.isConfirmed) {
await this.autoLabel(this.image.id)
await this.list(this.image.id)
}
},

7
frontend/pages/projects/_id/segmentation/index.vue

@ -202,9 +202,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.image.id)
async enableAutoLabeling(val) {
if (val && !this.image.isConfirmed) {
await this.autoLabel(this.image.id)
await this.list(this.image.id)
}
},

7
frontend/pages/projects/_id/sequence-labeling/index.vue

@ -193,9 +193,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.doc.id)
async enableAutoLabeling(val) {
if (val && !this.doc.isConfirmed) {
await this.autoLabel(this.doc.id)
await this.list(this.doc.id)
}
}
},

7
frontend/pages/projects/_id/sequence-to-sequence/index.vue

@ -96,9 +96,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.doc.id)
async enableAutoLabeling(val) {
if (val && !this.doc.isConfirmed) {
await this.autoLabel(this.doc.id)
await this.list(this.doc.id)
}
}
},

7
frontend/pages/projects/_id/speech-to-text/index.vue

@ -102,9 +102,10 @@ export default {
watch: {
'$route.query': '$fetch',
enableAutoLabeling(val) {
if (val) {
this.list(this.item.id)
async enableAutoLabeling(val) {
if (val && !this.item.isConfirmed) {
await this.autoLabel(this.item.id)
await this.list(this.item.id)
}
}
},

6
frontend/pages/projects/_id/text-classification/index.vue

@ -109,6 +109,12 @@ export default {
}
})
watch(query, fetch)
watch(enableAutoLabeling, async (val) => {
if (val && !exampleState.example.isConfirmed) {
await autoLabel(exampleState.example.id)
await getTeacherList(exampleState.example.id)
}
})
return {
...toRefs(labelState),

Loading…
Cancel
Save