Skip to content

Commit

Permalink
the issues seem resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel Kluin committed Jul 9, 2023
1 parent 8be2c33 commit a1b59d6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion javascript/tagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;

Expand Down Expand Up @@ -170,6 +172,7 @@ document.addEventListener('DOMContentLoaded', () => {
}

$tagConfidents.addEventListener('click', onClickLabels)
$discardTagConfidents.addEventListener('click', onClickLabels)

}).catch(err => {
console.error(err)
Expand Down
11 changes: 11 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 1 addition & 5 deletions tagger/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit a1b59d6

Please sign in to comment.