fix missing web_dir

This commit is contained in:
Lincoln Stein 2023-05-25 22:01:48 -04:00
parent dd157bce85
commit 46cab81d6f

View File

@ -15,6 +15,8 @@ from fastapi_events.middleware import EventHandlerASGIMiddleware
from pathlib import Path from pathlib import Path
from pydantic.schema import schema from pydantic.schema import schema
import invokeai.frontend.web as web_dir
from .api.dependencies import ApiDependencies from .api.dependencies import ApiDependencies
from .api.routers import sessions, models, images from .api.routers import sessions, models, images
from .api.sockets import SocketIO from .api.sockets import SocketIO
@ -124,7 +126,6 @@ app.openapi = custom_openapi
# Override API doc favicons # Override API doc favicons
app.mount("/static", StaticFiles(directory=Path(web_dir.__path__[0], 'static/dream_web')), name="static") app.mount("/static", StaticFiles(directory=Path(web_dir.__path__[0], 'static/dream_web')), name="static")
@app.get("/docs", include_in_schema=False) @app.get("/docs", include_in_schema=False)
def overridden_swagger(): def overridden_swagger():
return get_swagger_ui_html( return get_swagger_ui_html(