upgraded lollms

This commit is contained in:
saloui 2023-07-20 17:28:58 +02:00
parent f6991ecb44
commit dabd0758fd
9 changed files with 75 additions and 40 deletions

5
.gitignore vendored
View File

@ -196,4 +196,7 @@ personalities_zoo
bindings_zoo
user_data
src/
src/taming-transformers
src/taming-transformers
# Remove nogpu
.no_gpu

10
app.py
View File

@ -1671,6 +1671,16 @@ if __name__ == "__main__":
shutil.copy(default_user_avatar, user_avatar_path)
# executor = ThreadPoolExecutor(max_workers=1)
# app.config['executor'] = executor
# Check if .no_gpu file exists
no_gpu_file = Path('.no_gpu')
if no_gpu_file.exists():
# If the file exists, change self.config.use_gpu to False
config.enable_gpu = False
config.save_config()
# Remove the .no_gpu file
no_gpu_file.unlink()
bot = LoLLMsWebUI(app, socketio, config, config.file_path, lollms_paths)
# chong Define custom WebSocketHandler with error handling

View File

@ -145,6 +145,12 @@ else
exit 0
fi
if [[ "${gpuchoice^^}" == "B" ]]; then
echo "This is a .no_gpu file." > ../.no_gpu
else
echo "GPU is enabled, no .no_gpu file will be created."
fi
PrintBigMessage() {
echo
echo "*******************************************************************"

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.active-tab{font-weight:700}.scrollbar[data-v-3cb88319]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-3cb88319]::-webkit-scrollbar{width:8px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.toastItem-enter-active[data-v-3ffdabf3],.toastItem-leave-active[data-v-3ffdabf3]{transition:all .5s ease}.toastItem-enter-from[data-v-3ffdabf3],.toastItem-leave-to[data-v-3ffdabf3]{opacity:0;transform:translate(-30px)}.selected-choice{background-color:#bde4ff}.list-move[data-v-26009cd4],.list-enter-active[data-v-26009cd4],.list-leave-active[data-v-26009cd4]{transition:all .5s ease}.list-enter-from[data-v-26009cd4]{transform:translatey(-30px)}.list-leave-to[data-v-26009cd4]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-26009cd4]{position:absolute}.bounce-enter-active[data-v-26009cd4]{animation:bounce-in-26009cd4 .5s}.bounce-leave-active[data-v-26009cd4]{animation:bounce-in-26009cd4 .5s reverse}@keyframes bounce-in-26009cd4{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-26009cd4]{background-color:#0ff}.hover[data-v-26009cd4]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-26009cd4]{font-weight:700}.hljs-comment,.hljs-quote{color:#7285b7}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ff9da4}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ffc58f}.hljs-attribute{color:#ffeead}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#d1f1a9}.hljs-section,.hljs-title{color:#bbdaff}.hljs-keyword,.hljs-selector-tag{color:#ebbbff}.hljs{background:#002451;color:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}.active-tab{font-weight:700}.scrollbar[data-v-3cb88319]{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);white-space:pre-wrap;overflow-wrap:break-word}.scrollbar[data-v-3cb88319]::-webkit-scrollbar{width:8px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color);border-radius:4px}.scrollbar[data-v-3cb88319]::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color)}.toastItem-enter-active[data-v-3ffdabf3],.toastItem-leave-active[data-v-3ffdabf3]{transition:all .5s ease}.toastItem-enter-from[data-v-3ffdabf3],.toastItem-leave-to[data-v-3ffdabf3]{opacity:0;transform:translate(-30px)}.selected-choice{background-color:#bde4ff}.list-move[data-v-9c7a9f85],.list-enter-active[data-v-9c7a9f85],.list-leave-active[data-v-9c7a9f85]{transition:all .5s ease}.list-enter-from[data-v-9c7a9f85]{transform:translatey(-30px)}.list-leave-to[data-v-9c7a9f85]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-9c7a9f85]{position:absolute}.bounce-enter-active[data-v-9c7a9f85]{animation:bounce-in-9c7a9f85 .5s}.bounce-leave-active[data-v-9c7a9f85]{animation:bounce-in-9c7a9f85 .5s reverse}@keyframes bounce-in-9c7a9f85{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-9c7a9f85]{background-color:#0ff}.hover[data-v-9c7a9f85]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-9c7a9f85]{font-weight:700}.hljs-comment,.hljs-quote{color:#7285b7}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ff9da4}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ffc58f}.hljs-attribute{color:#ffeead}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#d1f1a9}.hljs-section,.hljs-title{color:#bbdaff}.hljs-keyword,.hljs-selector-tag{color:#ebbbff}.hljs{background:#002451;color:#fff}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
Theme: Tokyo-night-Dark
origin: https://github.com/enkia/tokyo-night-vscode-theme
Description: Original highlight.js style

4
web/dist/index.html vendored
View File

@ -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-4c5ae20c.js"></script>
<link rel="stylesheet" href="/assets/index-562b86e9.css">
<script type="module" crossorigin src="/assets/index-18032900.js"></script>
<link rel="stylesheet" href="/assets/index-cf16d40a.css">
</head>
<body>
<div id="app"></div>

View File

@ -1,13 +1,18 @@
<template>
<div>
<div v-for="extension in activeExtensions" :key="extension.name" @click="showExtensionPage(extension)">
<div>
<div v-if="activeExtensions.length > 0">
<div v-for="extension in activeExtensions" :key="extension.name" @click="showExtensionPage(extension)">
<div :class="{ 'active-tab': extension === activeExtension }">{{ extension.name }}</div>
</div>
<div v-if="activeExtension">
</div>
<div v-if="activeExtension">
<!-- Render the selected extension's page here -->
<iframe :src="activeExtension.page" width="100%" height="500px" frameborder="0"></iframe>
</div>
</div>
</div>
<div v-else>
<p>No extension is active. Please install and activate an extension.</p>
</div>
</div>
</template>
<script>

View File

@ -632,7 +632,7 @@
</td>
<td style="width: 100%;">
<label for="avatar-upload">
<img :src="user_avatar" class="w-50 h-50" style="max-width: 50px; max-height: 50px; cursor: pointer;">
<img :src="user_avatar" class="w-50 h-50 rounded-full" style="max-width: 50px; max-height: 50px; cursor: pointer;">
</label>
<input type="file" id="avatar-upload" style="display: none" @change="uploadAvatar">
</td>

View File

@ -124,6 +124,17 @@ if exist ..\win_update.bat (
goto end
)
setlocal enabledelayedexpansion
if /I "%gpuchoice%"=="B" (
echo This is a .no_gpu file. > ..\.no_gpu
) else (
echo GPU is enabled, no .no_gpu file will be created.
)
endlocal
:PrintBigMessage
echo. && echo.
echo *******************************************************************