m7n commited on
Commit
87ab2d3
·
verified ·
1 Parent(s): 878f019

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -3
main.py CHANGED
@@ -4,7 +4,6 @@ import json
4
  import base64
5
  from datetime import datetime
6
  import time
7
- from fastapi.staticfiles import StaticFiles
8
 
9
 
10
  # Standard imports
@@ -26,7 +25,7 @@ static_dir.mkdir(parents=True, exist_ok=True)
26
 
27
  # Mount static directory to FastAPI
28
  app.mount("/static", StaticFiles(directory="static"), name="static")
29
- app.mount("/_app/immutable/assets", StaticFiles(directory="assets"), name="immutable_assets")
30
 
31
  # Tell Gradio which paths are allowed to be served
32
  os.environ["GRADIO_ALLOWED_PATHS"] = str(static_dir.resolve())
@@ -77,7 +76,7 @@ with gr.Blocks() as demo:
77
  )
78
 
79
 
80
- #os.environ["GRADIO_ROOT_PATH"] = "https://m7n-zero-gpu-uvicorn-ssr-example.hf.space"
81
 
82
 
83
  # Mount Gradio app to FastAPI with SSR mode for Spaces
 
4
  import base64
5
  from datetime import datetime
6
  import time
 
7
 
8
 
9
  # Standard imports
 
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/_app/immutable/"
80
 
81
 
82
  # Mount Gradio app to FastAPI with SSR mode for Spaces