Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to alter local url address,thx #61

Closed
Modas-Li opened this issue Apr 11, 2023 · 1 comment
Closed

How to alter local url address,thx #61

Modas-Li opened this issue Apr 11, 2023 · 1 comment

Comments

@Modas-Li
Copy link

Running on local URL: http://127.0.0.1:7860
Want to change it to 0.0.0.0:7860

@Facico
Copy link
Owner

Facico commented Apr 11, 2023

Add the parameter "server_name=0.0.0.0" to the "launch" at the bottom of the corresponding web visualization python program(such as generate.py)
for example

import gradio as gr

def main():
    gr.Interface(
            fn=lambda x: x,
        inputs=[
            gr.inputs.Textbox(lines=2, placeholder="Enter your question here:"),
        ],
        outputs=[gr.outputs.Textbox()],
    ).launch(server_name='0.0.0.0')

if __name__ == '__main__':
    main()

More settings can be found in this project

@Facico Facico closed this as completed Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants