m7n commited on
Commit
993f4b0
·
verified ·
1 Parent(s): 6e2ce52

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -25,6 +25,7 @@ static_dir.mkdir(parents=True, exist_ok=True)
25
 
26
  # Mount static directory to FastAPI
27
  app.mount("/static", StaticFiles(directory="static"), name="static")
 
28
 
29
  # Tell Gradio which paths are allowed to be served
30
  os.environ["GRADIO_ALLOWED_PATHS"] = str(static_dir.resolve())
@@ -75,7 +76,7 @@ with gr.Blocks() as demo:
75
  )
76
 
77
 
78
- os.environ["GRADIO_ROOT_PATH"] = "https://m7n-zero-gpu-uvicorn-ssr-example.hf.space"
79
 
80
 
81
  # Mount Gradio app to FastAPI with SSR mode for Spaces
 
25
 
26
  # Mount static directory to FastAPI
27
  app.mount("/static", StaticFiles(directory="static"), name="static")
28
+ app.mount("/_app/immutable/assets", StaticFiles(directory="assets"), name="immutable_assets")
29
 
30
  # Tell Gradio which paths are allowed to be served
31
  os.environ["GRADIO_ALLOWED_PATHS"] = str(static_dir.resolve())
 
76
  )
77
 
78
 
79
+ #os.environ["GRADIO_ROOT_PATH"] = "https://m7n-zero-gpu-uvicorn-ssr-example.hf.space"
80
 
81
 
82
  # Mount Gradio app to FastAPI with SSR mode for Spaces