mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
Merge pull request #752 from gradio-app/Update-Docs
Update first launch commands to deliver the usage of ";" and app, pat…
This commit is contained in:
commit
d8dd35227b
@ -7,4 +7,4 @@ def greet(name):
|
||||
|
||||
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
||||
if __name__ == "__main__":
|
||||
iface.launch()
|
||||
iface.launch();
|
||||
|
@ -11,4 +11,5 @@ iface = gr.Interface(
|
||||
outputs="text",
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
iface.launch()
|
||||
app, path_to_local_server, share_url = iface.launch()
|
||||
|
||||
|
@ -14,4 +14,5 @@ iface = gr.Interface(
|
||||
outputs=["text", "number"],
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
iface.launch()
|
||||
app, path_to_local_server, share_url = iface.launch()
|
||||
|
||||
|
@ -36,6 +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)
|
||||
|
||||
{{ code["hello_world_2"] }}
|
||||
{{ demos["hello_world_2"] }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user