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 = ["*"]
|
||||
|
||||
# get current directory
|
||||
current_dir = os.getcwd()
|
||||
ui_path = os.path.join(current_dir, "_experimental", "out")
|
||||
app.mount("/ui", StaticFiles(directory=ui_path, html=True), name="ui")
|
||||
try:
|
||||
current_dir = os.getcwd()
|
||||
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(
|
||||
CORSMiddleware,
|
||||
allow_origins=origins,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue