Added stub for model name feedback

This commit is contained in:
ebolam 2022-03-07 14:20:25 -05:00
parent d0553779ab
commit 70f1c2da9c
3 changed files with 20 additions and 0 deletions

View File

@ -2569,6 +2569,9 @@ def get_message(msg):
f.write(msg['gpu_layers'])
f.close()
load_model(use_gpu=msg['use_gpu'], key=msg['key'], gpu_layers=msg['gpu_layers'])
elif(msg['cmd'] == 'show_model'):
print("Model Name: {}".format(getmodelname()))
emit('from_server', {'cmd': 'show_model_name', 'data': getmodelname()}, broadcast=True)
elif(msg['cmd'] == 'selectmodel'):
if msg['data'] in ('NeoCustom', 'GPT2Custom') and 'path' not in msg:
sendModelSelection(menu=msg['data'])

View File

@ -2420,6 +2420,10 @@ $(document).ready(function(){
} else if(msg.cmd == 'hide_layer_bar') {
$("#modellayers").addClass("hidden");
enableButtons([load_model_accept]);
} else if(msg.cmd == 'show_model_name') {
$("#showmodelnamecontent").html("<div class=\"flex\"><div class=\"loadlistpadding\"></div><div class=\"loadlistitem\">" + msg.data + "</div></div>");
$("#showmodelnamecontainer").removeClass("hidden");
console.log(msg.data);
}
});

View File

@ -319,6 +319,19 @@
</div>
</div>
</div>
<div class="popupcontainer hidden" id="showmodelnamecontainer">
<div id="nspopup">
<div class="popuptitlebar">
<div class="popuptitletext">Model Name</div>
</div>
<div class="aidgpopuplistheader" id=showmodelnamecontent>
Read Only
</div>
<div class="popupfooter">
<button type="button" class="btn btn-primary" onclick='$("#showmodelnamecontainer").addClass("hidden");'>OK</button>
</div>
</div>
</div>
<div class="popupcontainer hidden" id="spcontainer">
<div id="sppopup">
<div class="popuptitlebar">