persist control units state on restarts

This commit is contained in:
Vladimir Mandic
2024-09-19 20:10:53 -04:00
parent 271b493921
commit 4acf3c00a2
10 changed files with 117 additions and 34 deletions
+2
View File
@@ -1,4 +1,6 @@
function controlInputMode(inputMode, ...args) {
const updateEl = gradioApp().getElementById('control_update');
if (updateEl) updateEl.click();
const tab = gradioApp().querySelector('#control-tab-input button.selected');
if (!tab) return ['Select', ...args];
inputMode = tab.innerText;