Spaces:
Running
Running
Sync from GitHub via hub-sync
Browse files
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
ba0f6e79436de596d18bfca048d749658bad26c4
|
main.py
CHANGED
|
@@ -60,4 +60,8 @@ if __name__ == "__main__":
|
|
| 60 |
# server_name="0.0.0.0" is required inside HF Space containers.
|
| 61 |
# root_path ensures Gradio resolves JS/CSS assets correctly when running
|
| 62 |
# behind a reverse proxy or custom domain.
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
# server_name="0.0.0.0" is required inside HF Space containers.
|
| 61 |
# root_path ensures Gradio resolves JS/CSS assets correctly when running
|
| 62 |
# behind a reverse proxy or custom domain.
|
| 63 |
+
# Strip any trailing slash from GRADIO_ROOT_PATH; an incorrect value (e.g.
|
| 64 |
+
# the old .hf.space URL) after a custom-domain DNS change causes Gradio's
|
| 65 |
+
# frontend to fetch /info from the wrong origin → "Could not get API info".
|
| 66 |
+
_root_path = os.getenv("GRADIO_ROOT_PATH", "").rstrip("/")
|
| 67 |
+
demo.launch(server_name="0.0.0.0", root_path=_root_path)
|