-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gradio): enhance gradio interface (#90)
- Loading branch information
Showing
9 changed files
with
401 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# How-To: Visualize Collection | ||
|
||
db-ally provides simple way to visualize your collection with [Gradio](https://gradio.app){target="_blank"}. The app allows you to debug your views and query data using different LLMs. | ||
|
||
## Installation | ||
|
||
Install `dbally` with `gradio` extra. | ||
|
||
```bash | ||
pip install dbally["gradio"] | ||
``` | ||
|
||
## Run the app | ||
|
||
Pick the collection created using [`create_collection`][dbally.create_collection] and lunch the gradio interface. | ||
|
||
```python | ||
from dbally.gradio import create_gradio_interface | ||
|
||
gradio_interface = create_gradio_interface(collection) | ||
gradio_interface.launch() | ||
``` | ||
Visit <http://127.0.0.1:7860>{target="_blank"} to test the collection. | ||
|
||
!!! note | ||
By default, the app will use LLM API key defined in environment variable depending on the LLM provider used. You can override the key in the app. | ||
|
||
## Full Example | ||
|
||
Access the full example on [GitHub](https://github.com/deepsense-ai/db-ally/tree/main/examples/visualize_collection.py){target="_blank"}. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from dbally.gradio.gradio_interface import create_gradio_interface | ||
from dbally.gradio.interface import create_gradio_interface | ||
|
||
__all__ = ["create_gradio_interface"] |
Oops, something went wrong.