mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-25 12:10:31 +08:00
Merge pull request #755 from gradio-app/Update-Docs
Update The Docs on Launch
This commit is contained in:
commit
faf55f2c9e
@ -11,5 +11,5 @@ iface = gr.Interface(
|
||||
outputs="text",
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
app, path_to_local_server, share_url = iface.launch()
|
||||
app, local_url, share_url = iface.launch()
|
||||
|
||||
|
@ -14,5 +14,5 @@ iface = gr.Interface(
|
||||
outputs=["text", "number"],
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
app, path_to_local_server, share_url = iface.launch()
|
||||
iface.launch();
|
||||
|
||||
|
@ -36,10 +36,11 @@ With these three arguments, we can quickly create interfaces and `launch()` th
|
||||
|
||||
Let's say we want to customize the input text field - for example, we wanted it to be larger and have a text hint. If we use the actual input class for `Textbox` instead of using the string shortcut, we have access to much more customizability. To see a list of all the components we support and how you can customize them, check out the [Docs](https://gradio.app/docs).
|
||||
|
||||
**Sidenote**: `launch()` method returns
|
||||
- FastAPI application
|
||||
- Local URL
|
||||
- Public URL (if share=True)
|
||||
**Sidenote**: `Interface.launch()` method returns 3 values:
|
||||
1. `app`, which is the FastAPI application that is powering the Gradio demo
|
||||
2. `local_url`, which is the local address of the server
|
||||
3. `share_url`, which is the public address for this demo (it is generated if `share=True` more [on this later](https://gradio.app/getting_started/#sharing-interfaces-publicly))
|
||||
|
||||
|
||||
{{ code["hello_world_2"] }}
|
||||
{{ demos["hello_world_2"] }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user