diff --git a/javascript/tagger.js b/javascript/tagger.js index cdc1c82..d4735a1 100644 --- a/javascript/tagger.js +++ b/javascript/tagger.js @@ -79,7 +79,8 @@ document.addEventListener('DOMContentLoaded', () => { // tag-confident labels waitQuerySelector('#rating-confidences'), - waitQuerySelector('#tag-confidences') + waitQuerySelector('#tag-confidences'), + waitQuerySelector('#discard-tag-confidences') ]).then(elements => { const $keepTags = elements[0]; @@ -88,6 +89,7 @@ document.addEventListener('DOMContentLoaded', () => { const $replaceTags = elements[3]; const $ratingConfidents = elements[4]; const $tagConfidents = elements[5]; + const $discardTagConfidents = elements[6]; let $selectedTextarea = $keepTags; @@ -170,6 +172,7 @@ document.addEventListener('DOMContentLoaded', () => { } $tagConfidents.addEventListener('click', onClickLabels) + $discardTagConfidents.addEventListener('click', onClickLabels) }).catch(err => { console.error(err) diff --git a/style.css b/style.css index f148ce7..7ffadf2 100644 --- a/style.css +++ b/style.css @@ -22,6 +22,17 @@ foreground-color: #e6e6e6; } +#discard-tag-confidences .output-label>div:not(:first-child) { + cursor: pointer; +} + +#discard-tag-confidences .output-label>div:not(:first-child):hover { + foreground-color: #f5f5f5; +} + +#discard-tag-confidences .output-label>div:not(:first-child):active { + foreground-color: #e6e6e6; +} #tags a { font-weight: inherit; color: #888; diff --git a/tagger/ui.py b/tagger/ui.py index f58856d..6285f60 100644 --- a/tagger/ui.py +++ b/tagger/ui.py @@ -121,10 +121,6 @@ def on_tag_search_filter_change( def on_ui_tabs(): # If checkboxes misbehave you have to adapt the default.json preset - # FIXME: sliders misbehave: do not always pass the right value - # FIXME: Textbox does not always pass the right value - # FIXME: on exlusion tab the tag click does not work in the percentages box - with gr.Blocks(analytics_enabled=False) as tagger_interface: with gr.Row().style(equal_height=False): with gr.Column(variant='panel'): @@ -338,7 +334,7 @@ def on_ui_tabs(): ) excluded_tag_confidences = gr.Label( label='Excluded Tag confidences', - elem_id='tag-confidences', + elem_id='discard-tag-confidences', ) tab_include.select(fn=wrap_gradio_gpu_call(on_interrogate),