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

Simple Gradio sample crashes after loading #5459

Open
testlabauto opened this issue Nov 22, 2024 · 0 comments
Open

Simple Gradio sample crashes after loading #5459

testlabauto opened this issue Nov 22, 2024 · 0 comments

Comments

@testlabauto
Copy link
Contributor

System details:

Positron and OS details:

Positron Version: 2024.12.0 (Universal) build 41
OSX

Interpreter details:

Python 3.10.12

Describe the issue:

This simple Gradio sample no longer stays running:

import gradio as gr

def greet(name):
    return "Hello " + name + "!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()   

It dies with:

~/.pyenv/versions/3.10.12/bin/python /Users/christophermead/posit/qa-example-content/workspaces/python_apps/gradio_example/gradio_example.py
(base) ➜  qa-example-content ~/.pyenv/versions/3.10.12/bin/python /Users/christophermead/posit/qa-example-content/workspaces/python_apps/gradio_example/gradio_exam
ple.py
* Running on local URL:  http://127.0.0.1:7860
Traceback (most recent call last):
  File "/Users/christophermead/posit/qa-example-content/workspaces/python_apps/gradio_example/gradio_example.py", line 5, in <module>
    demo.launch()
  File "/Users/christophermead/.pyenv/versions/3.10.12/lib/python3.10/site-packages/gradio/blocks.py", line 2582, in launch
    raise ValueError(
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.

Steps to reproduce the issue:

  1. Run simple Gradio sample above
  2. Note that it will run but will quickly die

Expected or desired behavior:

Gradio continues to run.

Were there any error messages in the UI, Output panel, or Developer Tools console?

Did not see any

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

1 participant