mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
update docs and readme
This commit is contained in:
parent
28f4cc98a7
commit
e10d5954c3
@ -226,12 +226,6 @@ You can share your interface publicly and permanently by hosting on Gradio's inf
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Exploring Similar Examples with Embeddings
|
||||
|
||||
When you provide input to the function, you may wish to see if there are similar samples in the example dataset that could explain the behaviour of the function. For example, if an image model returns a peculiar output for a given input, you may load the training data into the examples dataset and see what training data samples are similar to the input you provided. If you enable this feature, you can click the *Order by Similarity* button to show the most similar samples from the example dataset.
|
||||
|
||||
Gradio supports exploring similar data samples through embeddings. Embeddings are a list of floats that numerically represent any input. To the `embedding` keyword argument of Interface, you must pass a function that takes the same inputs as the main `fn` argument, but instead returns an embedding that represents all the input values as a single list of floats. You can also pass the "default" string to `embedding` and Gradio will automatically generate embeddings for each sample in the examples dataset.
|
||||
|
||||
### Interpretation
|
||||
|
||||
Most models are black boxes such that the internal logic of the function is hidden from the end user. To encourage transparency, we've added the ability for interpretation so that users can understand what parts of the input are responsible for the output. Take a look at the simple interface below:
|
||||
|
@ -482,7 +482,7 @@ class Interface:
|
||||
inbrowser (bool): whether to automatically launch the interface in a new tab on the default browser.
|
||||
share (bool): whether to create a publicly shareable link from your computer for the interface.
|
||||
debug (bool): if True, and the interface was launched from Google Colab, prints the errors in the cell output.
|
||||
auth (Callable, Union[Tuple[str, str], List[Tuple[str, str]]]): If provided, username and password (or list of username-password tuples) required to access interface. Can also provide function that takes username and password and return True if valid login.
|
||||
auth (Callable, Union[Tuple[str, str], List[Tuple[str, str]]]): If provided, username and password (or list of username-password tuples) required to access interface. Can also provide function that takes username and password and returns True if valid login.
|
||||
auth_message (str): If provided, HTML message provided on login page.
|
||||
Returns:
|
||||
app (flask.Flask): Flask app object
|
||||
|
@ -146,12 +146,6 @@ You can share your interface publicly and permanently by hosting on Gradio's inf
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Exploring Similar Examples with Embeddings
|
||||
|
||||
When you provide input to the function, you may wish to see if there are similar samples in the example dataset that could explain the behaviour of the function. For example, if an image model returns a peculiar output for a given input, you may load the training data into the examples dataset and see what training data samples are similar to the input you provided. If you enable this feature, you can click the *Order by Similarity* button to show the most similar samples from the example dataset.
|
||||
|
||||
Gradio supports exploring similar data samples through embeddings. Embeddings are a list of floats that numerically represent any input. To the `embedding` keyword argument of Interface, you must pass a function that takes the same inputs as the main `fn` argument, but instead returns an embedding that represents all the input values as a single list of floats. You can also pass the "default" string to `embedding` and Gradio will automatically generate embeddings for each sample in the examples dataset.
|
||||
|
||||
### Interpretation
|
||||
|
||||
Most models are black boxes such that the internal logic of the function is hidden from the end user. To encourage transparency, we've added the ability for interpretation so that users can understand what parts of the input are responsible for the output. Take a look at the simple interface below:
|
||||
|
Loading…
Reference in New Issue
Block a user