Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,12 +140,12 @@ app.add_middleware(
|
|
| 140 |
allow_headers=["*"],
|
| 141 |
)
|
| 142 |
|
| 143 |
-
# Helper to fix root path if running behind proxy (Spaces)
|
| 144 |
-
def get_root_url(request: Request, route_path: str, root_path: str | None):
|
| 145 |
-
|
| 146 |
|
| 147 |
-
import gradio.route_utils
|
| 148 |
-
gr.route_utils.get_root_url = get_root_url
|
| 149 |
|
| 150 |
@app.post("/magic_quill/generate_image")
|
| 151 |
async def generate_image(request: Request):
|
|
|
|
| 140 |
allow_headers=["*"],
|
| 141 |
)
|
| 142 |
|
| 143 |
+
# # Helper to fix root path if running behind proxy (Spaces)
|
| 144 |
+
# def get_root_url(request: Request, route_path: str, root_path: str | None):
|
| 145 |
+
# return root_path
|
| 146 |
|
| 147 |
+
# import gradio.route_utils
|
| 148 |
+
# gr.route_utils.get_root_url = get_root_url
|
| 149 |
|
| 150 |
@app.post("/magic_quill/generate_image")
|
| 151 |
async def generate_image(request: Request):
|