qqwjq1981 commited on
Commit
bebe72f
·
verified ·
1 Parent(s): 3c5de00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -1139,14 +1139,14 @@ logging.debug(f"Gradio version: {gr.__version__}")
1139
  # Mount the Gradio ASGI app at "/gradio"
1140
  app.mount("/gradio", gradio_asgi_app)
1141
 
1142
- # Dynamically check for the Gradio asset directory
1143
- gradio_assets_path = os.path.join(os.path.dirname(gr.__file__), "static")
1144
-
1145
- if os.path.exists(gradio_assets_path):
1146
- # If assets exist, mount them
1147
- app.mount("/assets", StaticFiles(directory=gradio_assets_path), name="assets")
1148
- else:
1149
- logging.error(f"Gradio assets directory not found at: {gradio_assets_path}")
1150
 
1151
  # Redirect from the root endpoint to the Gradio app
1152
  @app.get("/", response_class=RedirectResponse)
 
1139
  # Mount the Gradio ASGI app at "/gradio"
1140
  app.mount("/gradio", gradio_asgi_app)
1141
 
1142
+ # # Dynamically check for the Gradio asset directory
1143
+ # gradio_assets_path = os.path.join(os.path.dirname(gr.__file__), "static")
1144
+
1145
+ # if os.path.exists(gradio_assets_path):
1146
+ # # If assets exist, mount them
1147
+ # app.mount("/assets", StaticFiles(directory=gradio_assets_path), name="assets")
1148
+ # else:
1149
+ # logging.error(f"Gradio assets directory not found at: {gradio_assets_path}")
1150
 
1151
  # Redirect from the root endpoint to the Gradio app
1152
  @app.get("/", response_class=RedirectResponse)