i18n notifications and details

This commit is contained in:
josc146
2023-05-18 21:19:13 +08:00
parent 5078a884b0
commit 934f7b15e8
7 changed files with 32 additions and 16 deletions

View File

@@ -35,7 +35,8 @@ def switch_model(body: SwitchModelBody, response: Response):
tokens_path=f"{pathlib.Path(__file__).parent.parent.resolve()}/20B_tokenizer.json",
),
)
except Exception:
except Exception as e:
print(e)
global_var.set(global_var.Model_Status, global_var.ModelStatus.Offline)
raise HTTPException(status.HTTP_500_INTERNAL_SERVER_ERROR, "failed to load")