forked from phoenix/litellm-mirror
(fix) try/except new ui feature
This commit is contained in:
parent
78fc27bb74
commit
deee837bb0
1 changed files with 6 additions and 3 deletions
|
@ -161,9 +161,12 @@ router = APIRouter()
|
||||||
origins = ["*"]
|
origins = ["*"]
|
||||||
|
|
||||||
# get current directory
|
# get current directory
|
||||||
current_dir = os.getcwd()
|
try:
|
||||||
ui_path = os.path.join(current_dir, "_experimental", "out")
|
current_dir = os.getcwd()
|
||||||
app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui")
|
ui_path = os.path.join(current_dir, "_experimental", "out")
|
||||||
|
app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=origins,
|
allow_origins=origins,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue