Spaces:
Running
Running
app.py: PORT env (default 7860) so it runs locally next to a service on 7860
Browse files
app.py
CHANGED
|
@@ -380,5 +380,5 @@ if __name__ == "__main__":
|
|
| 380 |
# don't pre-download it here.
|
| 381 |
# proxy_headers + trusting forwarded IPs lets Gradio honour X-Forwarded-Proto
|
| 382 |
# from HF's edge, so it generates https (not http) asset URLs behind the proxy.
|
| 383 |
-
uvicorn.run(app, host="0.0.0.0", port=7860,
|
| 384 |
proxy_headers=True, forwarded_allow_ips="*")
|
|
|
|
| 380 |
# don't pre-download it here.
|
| 381 |
# proxy_headers + trusting forwarded IPs lets Gradio honour X-Forwarded-Proto
|
| 382 |
# from HF's edge, so it generates https (not http) asset URLs behind the proxy.
|
| 383 |
+
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "7860")),
|
| 384 |
proxy_headers=True, forwarded_allow_ips="*")
|