Skip to content

Commit a343429

Browse files
Moritz WolfMoritz Wolf
Moritz Wolf
authored and
Moritz Wolf
committed
matthias build
1 parent 0727bef commit a343429

File tree

4 files changed

+134
-57
lines changed

4 files changed

+134
-57
lines changed

app/static/dist/app.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/static/dist/bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/templates/annotation_page.html

+69-26
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,74 @@
3333
</style>
3434

3535
{% endblock %} {% block content %}
36-
<div id="bodyContainer" style="display: flex; height: 100%" class="container-fluid">
36+
<div id="bodyContainer" class="container-fluid">
37+
<div id="sidebarContainer" class="sidebarContainer">
38+
<div style="display: flex; justify-content: space-between;flex-direction: column;">
39+
<div id="question" class="question"></div>
40+
<!-- <div class="progress progress-bar-vertical">
41+
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
42+
style="height: 60%;">
43+
<span class="sr-only">60% Complete</span>
44+
</div>
45+
</div>
46+
<ul class="carousel-list">
47+
<li class="">Vorherige Aufgabe</li>
48+
<li id="question" class="question"></li>
49+
<li class="">Nächste Aufgabe</li>
50+
</ul> -->
51+
<div id="answer" class="answer" style="margin-left: 10px;"></div>
52+
</div>
53+
<div id="controls" class="controls" style="flex: 0 0 auto; border: 1px solid; margin: 20px 0"></div>
54+
55+
<div style=" width: 100%; display: flex; flex-direction: column; flex: 1 1 auto; justify-content: center; margin-bottom: 10px; align-items: center;"
56+
id="picture-preview">
57+
<canvas id="picture-preview-canvas" style="max-width: 100%"></canvas>
58+
</div>
59+
60+
<div
61+
style="width: 100%; display: flex; justify-content: space-evenly; flex: 0 0 auto; padding: 5px 0; border: 1px solid;">
62+
<button id="instruction-b" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16"
63+
height="16" fill="currentColor" class="bi bi-question-circle" viewBox="0 0 16 16">
64+
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
65+
<path
66+
d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z" />
67+
</svg></button>
68+
<button id="patientrecord-b" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16"
69+
height="16" fill="currentColor" class="bi bi-file-earmark-medical" viewBox="0 0 16 16">
70+
<path
71+
d="M7.5 5.5a.5.5 0 0 0-1 0v.634l-.549-.317a.5.5 0 1 0-.5.866L6 7l-.549.317a.5.5 0 1 0 .5.866l.549-.317V8.5a.5.5 0 1 0 1 0v-.634l.549.317a.5.5 0 1 0 .5-.866L8 7l.549-.317a.5.5 0 1 0-.5-.866l-.549.317V5.5zm-2 4.5a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 2a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5z" />
72+
<path
73+
d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z" />
74+
</svg></button>
75+
</div>
76+
77+
<!-- <div class="display: none">
78+
<div id="question" class="question"></div>
79+
<div class="input-group pictureTask hidden" id="text-input-group">
80+
<input id="text-input" class="form-control" type="text" />
81+
<div class="input-group-append">
82+
<button class="btn btn-outline-secondary active" data-toggle="button" type="button" id="fzf-toggle">
83+
fzf
84+
</button>
85+
</div>
86+
</div>
87+
<ul style="overflow: scroll; margin-top: 10px; -webkit-overflow-scrolling: touch; " id="word-list"
88+
class="list-group pictureTask hidden">
89+
<button id="input-item" class="list-group-item" style="text-align: left"></button>
90+
</ul>
91+
<div id="answer" class="answer"></div>
92+
</div> -->
93+
<!-- <div id="sidebarBottom">
94+
<div id="controls" class="controls"></div>
95+
</div> -->
96+
</div>
3797
<div id="mainContainer" class="mainContainer">
3898
<div id="contentContainer" class="contentContainer">
3999
<div id="pictureContainer" class="pictureContainer pictureTask hidden">
40100
<div id="picture_content" style="height: 100%;justify-content: space-evenly;display: flex;">
41-
<div style=" width: 30%; display: flex; flex-direction: column;" id="picture-preview">
101+
<!-- <div style=" width: 30%; display: flex; flex-direction: column;" id="picture-preview">
42102
<canvas id="picture-preview-canvas" style="max-width: 100%"></canvas>
43-
</div>
103+
</div> -->
44104
<canvas id="picture-canvas" style="width: 75%"></canvas>
45105
</div>
46106
</div>
@@ -80,27 +140,7 @@ <h3 class="card-subtitle">Context</h3>
80140
</div>
81141
</div>
82142
</div>
83-
<div id="sidebarContainer" class="sidebarContainer">
84-
<div class="">
85-
<div id="question" class="question"></div>
86-
<div class="input-group pictureTask hidden" id="text-input-group">
87-
<input id="text-input" class="form-control" type="text" />
88-
<div class="input-group-append">
89-
<button class="btn btn-outline-secondary active" data-toggle="button" type="button" id="fzf-toggle">
90-
fzf
91-
</button>
92-
</div>
93-
</div>
94-
<ul style="overflow: scroll; margin-top: 10px; -webkit-overflow-scrolling: touch; " id="word-list"
95-
class="list-group pictureTask hidden">
96-
<button id="input-item" class="list-group-item" style="text-align: left"></button>
97-
</ul>
98-
<div id="answer" class="answer"></div>
99-
</div>
100-
<div id="sidebarBottom">
101-
<div id="controls" class="controls"></div>
102-
</div>
103-
</div>
143+
104144
<div id="endToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true"
105145
style="display: none; position: absolute; top: 0; right: 0">
106146
<div class="toast-header">
@@ -111,7 +151,7 @@ <h3 class="card-subtitle">Context</h3>
111151
<span aria-hidden="true">&times;</span>
112152
</button>
113153
</div>
114-
<div class="toast-body" style="color: green">
154+
<div class="toast-body" style="color: green;">
115155
Annotation successfully saved.
116156
</div>
117157
</div>
@@ -121,6 +161,9 @@ <h3 class="card-subtitle">Context</h3>
121161
$(this).hide()
122162
})
123163
</script>
164+
<!-- DEPENDENCIES -->
165+
<!-- <script src="https://unpkg.com/split.js/dist/split.min.js"></script> -->
166+
<!-- <script src="split"></script> -->
124167
<!-- <script src="https://unpkg.com/split.js/dist/split.min.js"></script> -->
125168
<script src="https://cdnjs.cloudflare.com/ajax/libs/split.js/1.6.2/split.min.js"
126169
integrity="sha512-to2k78YjoNUq8+hnJS8AwFg/nrLRFLdYYalb18SlcsFRXavCOTfBF3lNyplKkLJeB8YjKVTb1FPHGSy9sXfSdg=="
@@ -132,7 +175,7 @@ <h3 class="card-subtitle">Context</h3>
132175
} else {
133176
sizes = [50, 50] // default sizes
134177
}
135-
Split(['#mainContainer', '#sidebarContainer'], {
178+
var sidebarSplit = Split(['#sidebarContainer', '#mainContainer'], {
136179
gutterSize: 8,
137180
sizes,
138181
cursor: 'col-resize',

protocol.yml

+63-29
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,76 @@
11
%YAML 1.2
22
---
33
start:
4-
type: loadText
4+
type: loadImage
55
transitions:
66
- next:
7-
target: 'hateful'
7+
target: 'boundingbox'
88

9-
'hateful':
10-
type: boolean
11-
question: Is this a hateful comment?
12-
column: test
13-
transitions:
14-
- 'YES':
15-
target: 'primary_target'
16-
- 'NO':
17-
target: 'end'
9+
# 'paragraph_bb':
10+
# type: labelPicture
11+
# question: Draw a bounding box around the paragraph with english text.
12+
# maxbboxes: 1
13+
# transitions:
14+
# - '*':
15+
# target: 'topic'
1816

19-
'primary_target':
20-
type: select
21-
question: Who is the primary target?
22-
options: ['refugee', 'politician', 'other']
23-
transitions:
24-
- '*':
25-
target: 'targets'
17+
# 'topic':
18+
# type: labelBBoxes
19+
# question: What is the topic of this paragraph.
20+
# api_call: api_singlelabel
21+
# # from: 'paragraph_bb'
22+
# transitions:
23+
# - '*':
24+
# target: 'first_line'
2625

27-
'targets':
28-
type: checkmark
29-
question: Check all targets.
30-
options: ['refugee', 'politician', 'other']
26+
'boundingbox':
27+
type: boundingBoxPicture
28+
question: Draw bounding boxes in the image
3129
transitions:
3230
- '*':
33-
target: 'labels'
31+
target: 'polygons'
3432

35-
'labels':
36-
type: labelText
37-
question: Label all targets in the text.
38-
from: 'targets'
39-
# options: ['refugee', 'politician']
33+
'polygons':
34+
type: polygonPicture
35+
question: Draw polygons in the image.
4036
transitions:
4137
- '*':
42-
target: end
38+
target: 'end'
39+
# 'polygons':
40+
# type: polygonPicture
41+
# question: Bla
42+
# transitions:
43+
# - '*':
44+
# target: 'lines_bb'
45+
46+
# 'lines_bb':
47+
# type: labelPicture
48+
# question: Draw a bounding box around each line in the second paragraph.
49+
# transitions:
50+
# - '*':
51+
# target: 'for_loop'
52+
# 'for_loop':
53+
# type: loop
54+
# for: lines_bb
55+
# transitions:
56+
# - 'continue':
57+
# target: 'line_trans'
58+
# - 'finally':
59+
# target: 'end'
60+
# 'line_trans':
61+
# type: multilabelBBoxes
62+
# question: Transcribe the first line of the paragraph.
63+
# api_call: api_multilabel
64+
# # api_call: transform_image
65+
# from: 'for_loop'
66+
# transitions:
67+
# - '*':
68+
# target: 'for_loop'
69+
# # '1':
70+
# # type: labelBBoxes
71+
# # question: Draw a bounding box around a line with english animal names.
72+
# # saveAll: true
73+
# # column: test1
74+
# # transitions:
75+
# # - '*':
76+
# # target: 'end'

0 commit comments

Comments
 (0)