Spaces:
Sleeping
Sleeping
Petr Tsvetkov
commited on
Commit
·
bc37ba1
1
Parent(s):
5ff8f6f
New survey implemented
Browse files
app.py
CHANGED
@@ -94,27 +94,79 @@ with gr.Blocks(theme=gr.themes.Soft(), head=head_html, css="style_overrides.css"
|
|
94 |
commit_msg = gr.Textbox(label="Commit message",
|
95 |
interactive=False,
|
96 |
)
|
97 |
-
gr.Markdown("## Please,
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
submit_btn = gr.Button("Submit and continue")
|
119 |
session_val = gr.Textbox(info='Session', interactive=False, container=True, show_label=False,
|
120 |
label='session')
|
@@ -141,9 +193,14 @@ with gr.Blocks(theme=gr.themes.Soft(), head=head_html, css="style_overrides.css"
|
|
141 |
hash_val,
|
142 |
sample_loaded_timestamp,
|
143 |
sample_submitted_timestamp,
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
147 |
]
|
148 |
|
149 |
saver.setup([current_sample_sld] + feedback_form, "feedback")
|
|
|
94 |
commit_msg = gr.Textbox(label="Commit message",
|
95 |
interactive=False,
|
96 |
)
|
97 |
+
gr.Markdown("## Please, rate your level of agreement with each statement\n"
|
98 |
+
"\n"
|
99 |
+
"*1 - strongly disagree, 2 - disagree, 3 - agree, 4 - strongly agree*")
|
100 |
+
|
101 |
+
is_correct = gr.Slider(
|
102 |
+
info='The information provided in the commit message is consistent with the code changes.',
|
103 |
+
label='is_correct',
|
104 |
+
show_label=False,
|
105 |
+
minimum=1,
|
106 |
+
step=1,
|
107 |
+
interactive=True,
|
108 |
+
maximum=4)
|
109 |
+
|
110 |
+
has_what = gr.Slider(
|
111 |
+
info='The commit message answers the question of WHAT changes have been made.',
|
112 |
+
label='has_what',
|
113 |
+
show_label=False,
|
114 |
+
minimum=1,
|
115 |
+
step=1,
|
116 |
+
interactive=True,
|
117 |
+
maximum=4)
|
118 |
+
|
119 |
+
has_why = gr.Slider(
|
120 |
+
info='The commit message answers the question of WHY these changes have been made.',
|
121 |
+
label='has_why',
|
122 |
+
show_label=False,
|
123 |
+
minimum=1,
|
124 |
+
step=1,
|
125 |
+
interactive=True,
|
126 |
+
maximum=4)
|
127 |
+
|
128 |
+
is_not_verbose = gr.Slider(
|
129 |
+
info='The commit message can be substantially shortened without loss of important information.',
|
130 |
+
label='is_not_verbose',
|
131 |
+
show_label=False,
|
132 |
+
minimum=1,
|
133 |
+
step=1,
|
134 |
+
interactive=True,
|
135 |
+
maximum=4)
|
136 |
+
|
137 |
+
has_headline = gr.Slider(
|
138 |
+
info='The commit message includes a short headline that provides a good overview of the changes.',
|
139 |
+
label='has_headline',
|
140 |
+
show_label=False,
|
141 |
+
minimum=1,
|
142 |
+
step=1,
|
143 |
+
interactive=True,
|
144 |
+
maximum=4)
|
145 |
+
|
146 |
+
easy_to_read = gr.Slider(
|
147 |
+
info='The commit message is easy to read and to understand.',
|
148 |
+
label='easy_to_read',
|
149 |
+
show_label=False,
|
150 |
+
minimum=1,
|
151 |
+
step=1,
|
152 |
+
interactive=True,
|
153 |
+
maximum=4)
|
154 |
+
|
155 |
+
overall_rating = gr.Slider(
|
156 |
+
info='Please, describe your overall impression of the commit message (1 - very bad, 5 - very good)',
|
157 |
+
label='overall_rating',
|
158 |
+
show_label=False,
|
159 |
+
minimum=1,
|
160 |
+
step=1,
|
161 |
+
interactive=True,
|
162 |
+
maximum=5)
|
163 |
+
|
164 |
+
comments = gr.Textbox(
|
165 |
+
info='Additional comments on the commit message',
|
166 |
+
label='comments',
|
167 |
+
show_label=False,
|
168 |
+
interactive=True)
|
169 |
+
|
170 |
submit_btn = gr.Button("Submit and continue")
|
171 |
session_val = gr.Textbox(info='Session', interactive=False, container=True, show_label=False,
|
172 |
label='session')
|
|
|
193 |
hash_val,
|
194 |
sample_loaded_timestamp,
|
195 |
sample_submitted_timestamp,
|
196 |
+
is_correct,
|
197 |
+
has_what,
|
198 |
+
has_why,
|
199 |
+
is_not_verbose,
|
200 |
+
has_headline,
|
201 |
+
easy_to_read,
|
202 |
+
overall_rating,
|
203 |
+
comments
|
204 |
]
|
205 |
|
206 |
saver.setup([current_sample_sld] + feedback_form, "feedback")
|