Skip to content

Commit

Permalink
upgraded with model zoo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisNeo committed Sep 21, 2023
1 parent ee2ef5c commit c05c823
Show file tree
Hide file tree
Showing 12 changed files with 518 additions and 19 deletions.
Binary file added assets/petals.ico
Binary file not shown.
473 changes: 473 additions & 0 deletions assets/petals.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ubuntu.ico
Binary file not shown.
Binary file modified assets/ubuntu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion scripts/wsl/lollms-installer-with-petals.iss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ Source: "lollms_petals_installer.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "lollms_petals_runner.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "run_script.sh"; DestDir: "{app}"; Flags: ignoreversion
Source: "ubuntu.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "petals_server.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "petals_server.sh"; DestDir: "{app}"; Flags: ignoreversion
Source: "../../assets\logo.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "../../assets\ubuntu.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "../../assets\petals.ico"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Expand All @@ -61,7 +65,8 @@ Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\ubuntu.bat"; Filename: "{app}\ubuntu.bat"; Tasks: desktopicon; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\ubuntu.bat"; Filename: "{app}\ubuntu.bat"; Tasks: desktopicon; IconFilename: "{app}\ubuntu.ico"
Name: "{autodesktop}\petals_server.bat"; Filename: "{app}\petals_server.bat"; Tasks: desktopicon; IconFilename: "{app}\petals.ico"

[Run]
Filename: "{app}\lollms_petals_installer.bat"; Flags: shellexec
Expand Down
7 changes: 7 additions & 0 deletions scripts/wsl/petals_server.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

:: Execute the .sh script
wsl.exe -d Ubuntu-20.04 ./petals_server.sh

echo Script execution complete!
pause
8 changes: 8 additions & 0 deletions scripts/wsl/petals_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
cd ~/lollms-webui
# activate conda environment
source ~/miniconda/etc/profile.d/conda.sh
conda activate ./env

# Run petals server
python3 -m petals.cli.run_server petals-team/StableBeluga2

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions web/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-b6513711.js"></script>
<link rel="stylesheet" href="/assets/index-04d2e15d.css">
<script type="module" crossorigin src="/assets/index-fce2c7cf.js"></script>
<link rel="stylesheet" href="/assets/index-9d0cda62.css">
</head>
<body>
<div id="app"></div>
Expand Down
12 changes: 8 additions & 4 deletions web/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ export const store = createStore({
commit('setBindingsArr',bindingsArr)
},
async refreshModels({ commit }) {
console.log("Fetching models")
let modelsArr = await api_get_req("list_models");
console.log(`Found ${modelsArr}`)
let selectedModel = await api_get_req('get_active_model');
if(selectedModel!=undefined){
commit('setselectedModel',selectedModel["model"])
Expand Down Expand Up @@ -257,9 +259,6 @@ export const store = createStore({
// for each gpu
for (let i = 0; i < resp.nb_gpus; i++) {




const total_vram = resp[`gpu_${i}_total_vram`];
const used_vram = resp[`gpu_${i}_used_vram`];
const model = resp[`gpu_${i}_model`];
Expand Down Expand Up @@ -303,7 +302,10 @@ export const store = createStore({
this.state.refreshingModelsList=true;
axios.get('/get_available_models')
.then(response => {
console.log("HERE WE GO")
let models_zoo = response.data
console.log("models_zoo")
console.log(models_zoo)
models_zoo = models_zoo.filter(model => model.variants && model.variants.length>0);
if(this.state.sort_type==0){ // Sort by date
models_zoo.sort((a, b) => {
Expand Down Expand Up @@ -347,7 +349,9 @@ export const store = createStore({
}
}

}

}


if (index == -1) {
let newModelEntry = {}
Expand Down
4 changes: 3 additions & 1 deletion web/src/views/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2133,8 +2133,10 @@ export default {
// this.modelsArr.sort()
// this.persCatgArr.sort()
// this.persArr.sort()
console.log("models_zoo:")
console.log(this.models)
//await this.getPersonalitiesArr()
this.personality_category = this.configFile.personality_category
this.personalitiesFiltered = this.personalities.filter((item) => item.category === this.configFile.personality_category)
Expand Down

0 comments on commit c05c823

Please sign in to comment.