mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-20 17:22:47 +00:00
fixed error
This commit is contained in:
parent
99fd4cd53b
commit
59e4e48b91
@ -5,8 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + Vue</title>
|
||||
<script type="module" crossorigin src="/assets/index-53a6hd9C.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-9yYAPY-Y.css">
|
||||
<script type="module" crossorigin src="/assets/index-gD_iVx44.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-tsveoIuX.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -36,8 +36,6 @@ ASCIIColors.red(" LoLLMS configuratoin tool")
|
||||
ASCIIColors.yellow(f"Root dir : {root_path}")
|
||||
app = FastAPI(debug=True)
|
||||
|
||||
class InstallProperties(BaseModel):
|
||||
mode: str
|
||||
|
||||
# Serve the index.html file for all routes
|
||||
@app.get("/{full_path:path}")
|
||||
@ -50,13 +48,16 @@ async def serve_index(request: Request, full_path: Path):
|
||||
return FileResponse(root_path/"scripts/python/lollms_installer/frontend/dist"/full_path)
|
||||
return FileResponse(root_path/"scripts/python/lollms_installer/frontend/dist/index.html")
|
||||
|
||||
app.mount("/", StaticFiles(directory=root_path/"scripts/python/lollms_installer/frontend/dist"), name="static")
|
||||
# app.mount("/", StaticFiles(directory=root_path/"scripts/python/lollms_installer/frontend/dist"), name="static")
|
||||
|
||||
|
||||
class InstallProperties(BaseModel):
|
||||
mode: str
|
||||
|
||||
@app.post("/start_installing")
|
||||
def start_installing(data: InstallProperties):
|
||||
if data=="cpu":
|
||||
config.enable_gpu=False
|
||||
|
||||
if data.mode=="cpu":
|
||||
config.enable_gpu=False
|
||||
config.save_config()
|
||||
else:
|
||||
config.enable_gpu=True
|
||||
|
Loading…
x
Reference in New Issue
Block a user