Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -171,7 +171,7 @@ def dev_opts_fn(check_box,phone_output_keyinfo):
|
|
| 171 |
gr.update(value= _disp_scorertype('...'),visible=new_vis),
|
| 172 |
gr.update(value=(fb_params['lb'], fb_params['ub']),visible=new_vis),
|
| 173 |
reset_fb,
|
| 174 |
-
gr.update(visible=new_vis), gr.update(visible=new_vis), gr.update(visible=new_vis)]
|
| 175 |
|
| 176 |
|
| 177 |
def display0(score_output):
|
|
@@ -220,9 +220,6 @@ with bl:
|
|
| 220 |
#with gr.Column(scale=0):
|
| 221 |
score_speech_button = gr.Button("⇩⇩⇩ Greina upptökuna ⇩⇩⇩")
|
| 222 |
|
| 223 |
-
#phone_output = gr.Markdown('')
|
| 224 |
-
plot_output = gr.Plot()
|
| 225 |
-
|
| 226 |
with gr.Row(equal_height=True):
|
| 227 |
with gr.Column(scale=1):
|
| 228 |
placeholder_output = gr.Markdown("## Einkunn/gæði: ...")
|
|
@@ -231,18 +228,22 @@ with bl:
|
|
| 231 |
blocks_info = gr.Markdown("""*This colour feedback was not calibrated by exercise/phone,
|
| 232 |
relative colours may mismatch other scores""",visible=False)
|
| 233 |
|
|
|
|
|
|
|
| 234 |
with gr.Row():
|
| 235 |
-
with gr.Column():
|
| 236 |
phone_output_keyinfo = gr.Markdown("""### Lykill: <span style='color:#26701C;'>Meira nálægt</span>, <span style='color:#E85907;'>Minna nálægt</span>, <span style='color:#BBBBBB;'>Ekki hægt að greina (of stutt hljóð)</span>, <span style='color:#88447F;'>••• Pitch</span>""")
|
|
|
|
| 237 |
dev_checkbox = gr.Checkbox(label="[Debug]", value=False)
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
| 244 |
|
| 245 |
-
###
|
| 246 |
""", visible=False)
|
| 247 |
|
| 248 |
new_prompt_button.click(refresh_prompt_fn,
|
|
@@ -251,7 +252,7 @@ with bl:
|
|
| 251 |
|
| 252 |
dev_checkbox.input(dev_opts_fn,
|
| 253 |
inputs = [dev_checkbox,phone_output_keyinfo],
|
| 254 |
-
outputs = [phone_output_keyinfo, modeltype_info, calibrate_slider, fb, cali_info, blocks_output, blocks_info])
|
| 255 |
|
| 256 |
calibrate_slider.release(recal_fb_fn,
|
| 257 |
inputs = [calibrate_slider],
|
|
|
|
| 171 |
gr.update(value= _disp_scorertype('...'),visible=new_vis),
|
| 172 |
gr.update(value=(fb_params['lb'], fb_params['ub']),visible=new_vis),
|
| 173 |
reset_fb,
|
| 174 |
+
gr.update(visible=new_vis), gr.update(visible=new_vis), gr.update(visible=new_vis), gr.update(visible=new_vis)]
|
| 175 |
|
| 176 |
|
| 177 |
def display0(score_output):
|
|
|
|
| 220 |
#with gr.Column(scale=0):
|
| 221 |
score_speech_button = gr.Button("⇩⇩⇩ Greina upptökuna ⇩⇩⇩")
|
| 222 |
|
|
|
|
|
|
|
|
|
|
| 223 |
with gr.Row(equal_height=True):
|
| 224 |
with gr.Column(scale=1):
|
| 225 |
placeholder_output = gr.Markdown("## Einkunn/gæði: ...")
|
|
|
|
| 228 |
blocks_info = gr.Markdown("""*This colour feedback was not calibrated by exercise/phone,
|
| 229 |
relative colours may mismatch other scores""",visible=False)
|
| 230 |
|
| 231 |
+
plot_output = gr.Plot()
|
| 232 |
+
|
| 233 |
with gr.Row():
|
| 234 |
+
with gr.Column(scale=2):
|
| 235 |
phone_output_keyinfo = gr.Markdown("""### Lykill: <span style='color:#26701C;'>Meira nálægt</span>, <span style='color:#E85907;'>Minna nálægt</span>, <span style='color:#BBBBBB;'>Ekki hægt að greina (of stutt hljóð)</span>, <span style='color:#88447F;'>••• Pitch</span>""")
|
| 236 |
+
with gr.Column(scale=1):
|
| 237 |
dev_checkbox = gr.Checkbox(label="[Debug]", value=False)
|
| 238 |
+
|
| 239 |
+
with gr.Row():
|
| 240 |
+
modeltype_info = gr.Markdown(_disp_scorertype('...'),visible=False)
|
| 241 |
+
with gr.Column():
|
| 242 |
+
calibrate_slider = RangeSlider(minimum=-1, maximum=1, value=(fb_lb, fb_ub), interactive=True, visible=False)
|
| 243 |
+
cali_title = gr.Markdown("""#### ◭ Re-calibrate scoring""", visible=False)
|
| 244 |
+
cali_info=gr.Markdown("""Too easy, always 100? Raise the maximum. Too hard, always 0? Lower the minimum.
|
| 245 |
|
| 246 |
+
### Re-calibration does not affect Monophone model.
|
| 247 |
""", visible=False)
|
| 248 |
|
| 249 |
new_prompt_button.click(refresh_prompt_fn,
|
|
|
|
| 252 |
|
| 253 |
dev_checkbox.input(dev_opts_fn,
|
| 254 |
inputs = [dev_checkbox,phone_output_keyinfo],
|
| 255 |
+
outputs = [phone_output_keyinfo, modeltype_info, calibrate_slider, fb, cali_title, cali_info, blocks_output, blocks_info])
|
| 256 |
|
| 257 |
calibrate_slider.release(recal_fb_fn,
|
| 258 |
inputs = [calibrate_slider],
|