Problem with URL connection

Author: lindawang0122dsCreated Jul 22, 2024Updated Feb 24, 2025

I use gradio 3.39.0 to run Track-Anything Model. However, the local URL generated by gradio refuse to connect when I pasted the URL into the Google Chrome.

My setting: Python 3.10.11 Gradio 3.39.0

I use the Linux system O2 portal and use the terminal in O2 portal to run the program so I'm not quite sure if gradio actually generate a local URL or not.

I also modified app.py: iface.queue(concurrency_count=1) #iface.launch(debug=True, enable_queue=True, server_port=args.port, server_name="0.0.0.0") # commanded by Linda iface.launch(debug=True, enable_queue=True) # Linda's modified code

Following is the output in terminal when I run app.py: [suw469@compute-g-17-145 Track-Anything]$ python app.py --device cuda:0 /home/suw469/.local/lib/python3.10/site-packages/gradio_client/documentation.py:105: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}") /home/suw469/.local/lib/python3.10/site-packages/gradio_client/documentation.py:105: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix' warnings.warn(f"Could not get documentation group for {cls}: {exc}") Initializing BaseSegmenter to cuda:0 Hyperparameters read from the model weights: C^k=64, C^v=512, C^h=64 Single object mode: False load pretrained SPyNet... Loads checkpoint by http backend from path: https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth /home/suw469/Track-Anything/app.py:434: GradioUnusedKwargWarning: You have unused kwarg parameters in Row, please remove them: {'scale': 0.4} with gr.Row(scale=0.4): /home/suw469/Track-Anything/app.py:435: GradioUnusedKwargWarning: You have unused kwarg parameters in Video, please remove them: {'autosize': True} video_input = gr.Video(autosize=True) /home/suw469/Track-Anything/app.py:460: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. clear_button_click = gr.Button(value="Clear clicks", interactive=True, visible=False).style(height=160) /home/suw469/Track-Anything/app.py:462: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. template_frame = gr.Image(type="pil",interactive=True, elem_id="template_frame", visible=False).style(height=360) /home/suw469/Track-Anything/app.py:469: GradioUnusedKwargWarning: You have unused kwarg parameters in Video, please remove them: {'autosize': True} video_output = gr.Video(autosize=True, visible=False).style(height=360) /home/suw469/Track-Anything/app.py:469: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead. video_output = gr.Video(autosize=True, visible=False).style(height=360) /home/suw469/.local/lib/python3.10/site-packages/gradio/utils.py:833: UserWarning: Expected 4 arguments for function <function select_template at 0x7f23102b6830>, received 3. warnings.warn( /home/suw469/.local/lib/python3.10/site-packages/gradio/utils.py:837: UserWarning: Expected at least 4 arguments for function <function select_template at 0x7f23102b6830>, received 3. warnings.warn( /home/suw469/Track-Anything/app.py:605: GradioDeprecationWarning: The enable_queue parameter has been deprecated. Please use the .queue() method instead. iface.launch(debug=True, enable_queue=True) # Linda's modified code Running on local URL: http://127.0.0.1:7863

To create a public link, set share=True in launch(). IMPORTANT: You are using gradio version 3.39.0, however version 4.29.0 is available, please upgrade.

When I pasted http://127.0.0.1:7863 to Google Chrome, the website shows:

This site can’t be reached127.0.0.1 refused to connect. Try:

Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED Screenshot 2024-07-22 at 2 40 49 PM

Source: gaomingqi/Track-Anything