initialize project structure with React frontend and backend serving script
This commit is contained in:
1 parent
a9d11a7f46
commit
eb5d9d8e89
9 files changed
+171
-269
No files matched your search
@@ -638,6 +638,7 @@ function getDefaultModel() {
|
||||
|
||||
function killBackend() {
|
||||
return new Promise(resolve => {
|
||||
resetGenerationState();
|
||||
if (!backendProc) {
|
||||
backendUnloadState = { active: false, phase: "", progress: 0 };
|
||||
resolve();
|
||||
@@ -878,6 +879,16 @@ let generationState = {
|
||||
decoding: false,
|
||||
};
|
||||
|
||||
function resetGenerationState() {
|
||||
generationState = {
|
||||
active: false,
|
||||
step: 0,
|
||||
steps: 0,
|
||||
speed: "",
|
||||
decoding: false,
|
||||
};
|
||||
}
|
||||
|
||||
function startModelDownload(url, overrideFilename = null) {
|
||||
if (downloadState.active && !overrideFilename) {
|
||||
console.log(" [download] Already downloading a model");
|
||||
|
||||
Reference in new issue
Block a user