Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -556,23 +556,22 @@ with gr.Blocks(css=css) as demo:
|
|
556 |
this.value = \"\";
|
557 |
}
|
558 |
}
|
559 |
-
'/><pre
|
560 |
-
this.innerHTML = this.innerText.replace(/[weasdzx]/gi, function(c){
|
561 |
-
return \"<b style="color:red">\" + c.toUpperCase() + \"</b>\";
|
562 |
-
});
|
563 |
-
this.innerHTML = this.innerText.replace(/[tyfghvb]/gi, function(c){
|
564 |
-
return \"<b style="color:green">\" + c.toUpperCase() + \"</b>\";
|
565 |
-
});
|
566 |
-
this.innerHTML = this.innerText.replace(/[iojklm,]/gi, function(c){
|
567 |
-
return \"<b style="color:blue">\" + c.toUpperCase() + \"</b>\";
|
568 |
-
});
|
569 |
-
'>
|
570 |
` 1 2 3 4 5 6 7 8 9 0 - =
|
571 |
Q W E R T Y U I O P { }
|
572 |
A S D F G H J K L ; '
|
573 |
Z X C V B N M , . /
|
574 |
move rotate scale
|
575 |
-
</pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
577 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth, selected], show_progress='hidden')
|
578 |
output_depth.select(fn=select_frame, inputs=None, outputs=[output_frame, selected], show_progress='hidden')
|
|
|
556 |
this.value = \"\";
|
557 |
}
|
558 |
}
|
559 |
+
'/><pre id='keymap'>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
` 1 2 3 4 5 6 7 8 9 0 - =
|
561 |
Q W E R T Y U I O P { }
|
562 |
A S D F G H J K L ; '
|
563 |
Z X C V B N M , . /
|
564 |
move rotate scale
|
565 |
+
</pre><script>
|
566 |
+
alert(\"hi\");
|
567 |
+
document.getElementById(\"keymap\").innerHTML = document.getElementById(\"keymap\").innerText.replace(/\s[weasdzx]\s/gi, function(c){
|
568 |
+
return \"<b style="color:red">\" + c.toUpperCase() + \"</b>\";
|
569 |
+
}).replace(/\s[tyfghvb]\s/gi, function(c){
|
570 |
+
return \"<b style="color:green">\" + c.toUpperCase() + \"</b>\";
|
571 |
+
}).replace(/\s[iojklm,]\s/gi, function(c){
|
572 |
+
return \"<b style="color:blue">\" + c.toUpperCase() + \"</b>\";
|
573 |
+
});
|
574 |
+
</script>""")
|
575 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
576 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth, selected], show_progress='hidden')
|
577 |
output_depth.select(fn=select_frame, inputs=None, outputs=[output_frame, selected], show_progress='hidden')
|