Introducing Gradio ClientsJoin us on Thursday, 9am PST
LivestreamIntroducing Gradio ClientsJoin us on Thursday, 9am PST
LivestreamNew to Gradio? Start here: Getting Started
See the Release History
To install Gradio from main, run the following command:
pip install https://gradio-builds.s3.amazonaws.com/7672b0a761088fb817b0f686cd3c333bd4a5cfed/gradio-4.36.1-py3-none-any.whl
*Note: Setting share=True
in
launch()
will not work.
gradio.Info("Helpful info message â¹ïž", duration=5)
gr.Info('message here')
in your function, and when that line is executed the custom message will appear in a modal on the demo. The modal is gray by default and has the heading: "Info." Queue must be enabled for this behavior; otherwise, the message will be printed to the console.import gradio as gr
def hello_world():
gr.Info('This is some info.')
return "hello world"
with gr.Blocks() as demo:
md = gr.Markdown()
demo.load(hello_world, inputs=None, outputs=[md])
demo.queue().launch()
Parameter | Description |
---|---|
message str default: "Info issued." | The info message to be displayed to the user. |
duration float | None default: 10 | The duration in seconds that the info message should be displayed for. If None or 0, the message will be displayed indefinitely until the user closes it. |
visible bool default: True | Whether the error message should be displayed in the UI. |