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:
Ömer Faruk Özdemir 2022-02-28 19:20:36 +03:00 committed by GitHub
commit d8dd35227b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -7,4 +7,4 @@ def greet(name):
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
if __name__ == "__main__":
iface.launch()
iface.launch();

View File

@ -11,4 +11,5 @@ iface = gr.Interface(
outputs="text",
)
if __name__ == "__main__":
iface.launch()
app, path_to_local_server, share_url = iface.launch()

View File

@ -14,4 +14,5 @@ iface = gr.Interface(
outputs=["text", "number"],
)
if __name__ == "__main__":
iface.launch()
app, path_to_local_server, share_url = iface.launch()

View File

@ -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"] }}