Style fixes

pull/2/head
ilian.iliev 2023-05-11 01:51:04 +03:00
parent bce5f1ee06
commit 201827aff5
4 changed files with 13 additions and 10 deletions

View File

@ -37,8 +37,8 @@ def list_models(model_path):
python = sys.executable
run(f'"{python}" -m pip install lightning-utilities==0.4.0', desc=f"Installing lightning-utilities", errdesc=f"Couldn't install lightning-utilities")
run(f'"{python}" -m pip install pytorch-lightning==1.7.6', desc=f"Installing pytorch-lightning", errdesc=f"Couldn't install pytorch-lightning")
run(f'"{python}" -m pip install lightning-utilities==0.4.0', desc=None, errdesc=f"Couldn't install lightning-utilities")
run(f'"{python}" -m pip install pytorch-lightning==1.7.6', desc=None, errdesc=f"Couldn't install pytorch-lightning")
if not is_installed("dlib"):
run(f'"{python}" -m pip install setuptools', desc="Installing setuptools", errdesc="Couldn't install setuptools")

View File

@ -8,12 +8,7 @@ document.addEventListener('DOMContentLoaded', function() {
timeOut: 3500
};
window.gradioRoot = gradioApp().querySelector('.gradio-container');
window.$gradioRoot = $(window.gradioRoot);
onUiLoaded(EyeMaskController.load);
$gradioRoot.append('<div id="dialogs-container"></div>')
});
@ -42,6 +37,12 @@ const EyeMaskController = (function () {
return '/sdapi/v1/eyemask/v1' + path;
}
function initRoot() {
window.gradioRoot = gradioApp().querySelector('.gradio-container');
window.$gradioRoot = $(window.gradioRoot);
$gradioRoot.append('<div id="dialogs-container"></div>');
}
function loadTitles() {
gradioApp().querySelectorAll('span, button, select, p').forEach(function(elem) {
if (elem) {
@ -176,6 +177,7 @@ const EyeMaskController = (function () {
function onFirstLoad() {
getConfig();
initRoot();
loadTitles();
loadPlaceHolders();
}
@ -187,6 +189,7 @@ const EyeMaskController = (function () {
function showInfo() {
dialog.image('mask-types.jpg', 'Mask Types', null, '80%');
return true;
}
return {

View File

@ -97,9 +97,9 @@ class EyeMaskUI():
value=self.eye_mask_core.MASK_TYPES[0],
type="index"
)
em_info = ToolButton(value="\u2139\uFE0F", elem_id="eye-info-button", full_width=False)
em_info = ToolButton(value="\u2139\uFE0F", elem_id=get_id("eye-info-button"), full_width=False)
em_info.click(
fn=lambda: '',
fn=lambda: True,
_js="() => EyeMaskController.showInfo()",
show_progress=False
)

View File

@ -14,8 +14,8 @@
));
@include select('mask-type-row', (
margin-top: 20px,
margin-bottom: 20px,
padding: 0 12px,
font-size: 12px
));