Skip to content

Commit a1b59d6

Browse files
author
Roel Kluin
committed
the issues seem resolved
1 parent 8be2c33 commit a1b59d6

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

javascript/tagger.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ document.addEventListener('DOMContentLoaded', () => {
7979

8080
// tag-confident labels
8181
waitQuerySelector('#rating-confidences'),
82-
waitQuerySelector('#tag-confidences')
82+
waitQuerySelector('#tag-confidences'),
83+
waitQuerySelector('#discard-tag-confidences')
8384
]).then(elements => {
8485

8586
const $keepTags = elements[0];
@@ -88,6 +89,7 @@ document.addEventListener('DOMContentLoaded', () => {
8889
const $replaceTags = elements[3];
8990
const $ratingConfidents = elements[4];
9091
const $tagConfidents = elements[5];
92+
const $discardTagConfidents = elements[6];
9193

9294
let $selectedTextarea = $keepTags;
9395

@@ -170,6 +172,7 @@ document.addEventListener('DOMContentLoaded', () => {
170172
}
171173

172174
$tagConfidents.addEventListener('click', onClickLabels)
175+
$discardTagConfidents.addEventListener('click', onClickLabels)
173176

174177
}).catch(err => {
175178
console.error(err)

style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@
2222
foreground-color: #e6e6e6;
2323
}
2424

25+
#discard-tag-confidences .output-label>div:not(:first-child) {
26+
cursor: pointer;
27+
}
28+
29+
#discard-tag-confidences .output-label>div:not(:first-child):hover {
30+
foreground-color: #f5f5f5;
31+
}
32+
33+
#discard-tag-confidences .output-label>div:not(:first-child):active {
34+
foreground-color: #e6e6e6;
35+
}
2536
#tags a {
2637
font-weight: inherit;
2738
color: #888;

tagger/ui.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ def on_tag_search_filter_change(
121121
def on_ui_tabs():
122122
# If checkboxes misbehave you have to adapt the default.json preset
123123

124-
# FIXME: sliders misbehave: do not always pass the right value
125-
# FIXME: Textbox does not always pass the right value
126-
# FIXME: on exlusion tab the tag click does not work in the percentages box
127-
128124
with gr.Blocks(analytics_enabled=False) as tagger_interface:
129125
with gr.Row().style(equal_height=False):
130126
with gr.Column(variant='panel'):
@@ -338,7 +334,7 @@ def on_ui_tabs():
338334
)
339335
excluded_tag_confidences = gr.Label(
340336
label='Excluded Tag confidences',
341-
elem_id='tag-confidences',
337+
elem_id='discard-tag-confidences',
342338
)
343339

344340
tab_include.select(fn=wrap_gradio_gpu_call(on_interrogate),

0 commit comments

Comments
 (0)