If you are running a gradio ‘sdk: gradio’ application, you can set the server_name and server_port in the launch function call of the app.py.
interface.launch(server_name="0.0.0.0", server_port=7860)