Spaces:
Sleeping
feat: Bind Gradio server to 0.0.0.0 for external access
Browse filesChange:
- Update demo.launch() to bind to 0.0.0.0:7860
- Previously bound to 127.0.0.1 (localhost only)
- Now accessible from external network connections
Configuration:
- server_name="0.0.0.0": Listen on all network interfaces
- server_port=7860: Explicit port specification
Use Cases:
- Docker containers: Accessible from host machine
- Network deployment: Accessible from other devices on LAN
- Remote development: SSH tunneling and port forwarding
- HF Spaces: Compatible with container networking
Local Access:
- http://localhost:7860 (still works)
- http://127.0.0.1:7860 (still works)
- http://<your-ip>:7860 (now works)
Security Note:
- 0.0.0.0 binding exposes service to network
- Use firewall rules for production deployments
- HF Spaces handles security automatically
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
@@ -468,4 +468,4 @@ with gr.Blocks(title="🤖 Multi-Model Chatbot") as demo:
|
|
| 468 |
gr.Markdown(footer)
|
| 469 |
|
| 470 |
if __name__ == "__main__":
|
| 471 |
-
demo.launch()
|
|
|
|
| 468 |
gr.Markdown(footer)
|
| 469 |
|
| 470 |
if __name__ == "__main__":
|
| 471 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|