Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
3a38e1d
1
Parent(s):
1cb2b40
update ui
Browse files- llama_lora/ui/inference_ui.py +16 -0
- llama_lora/ui/main_page.py +4 -0
llama_lora/ui/inference_ui.py
CHANGED
@@ -522,6 +522,22 @@ def inference_ui():
|
|
522 |
if (!e) return;
|
523 |
e.addEventListener('input', debounce(update_preview, 500));
|
524 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
}, 100);
|
526 |
}
|
527 |
""")
|
|
|
522 |
if (!e) return;
|
523 |
e.addEventListener('input', debounce(update_preview, 500));
|
524 |
}
|
525 |
+
|
526 |
+
const prompt_template_selector = document.querySelector(
|
527 |
+
'#inference_prompt_template .wrap-inner'
|
528 |
+
);
|
529 |
+
|
530 |
+
if (prompt_template_selector) {
|
531 |
+
new MutationObserver(
|
532 |
+
debounce(function () {
|
533 |
+
if (prompt_template_selector.classList.contains('showOptions')) return;
|
534 |
+
update_preview();
|
535 |
+
}, 500)
|
536 |
+
).observe(prompt_template_selector, {
|
537 |
+
attributes: true,
|
538 |
+
attributeFilter: ['class'],
|
539 |
+
});
|
540 |
+
}
|
541 |
}, 100);
|
542 |
}
|
543 |
""")
|
llama_lora/ui/main_page.py
CHANGED
@@ -139,6 +139,10 @@ def main_page_custom_css():
|
|
139 |
border-top-right-radius: 0;
|
140 |
}
|
141 |
|
|
|
|
|
|
|
|
|
142 |
#inference_options_accordion {
|
143 |
padding: 0;
|
144 |
}
|
|
|
139 |
border-top-right-radius: 0;
|
140 |
}
|
141 |
|
142 |
+
#inference_prompt_box {
|
143 |
+
flex-grow: 0 !important;
|
144 |
+
}
|
145 |
+
|
146 |
#inference_options_accordion {
|
147 |
padding: 0;
|
148 |
}
|