A Gradio custom component to display RAG sources
Project description
tags: [gradio-custom-component, ] title: gradio_rag_sources short_description: A Gradio custom component to display RAG sources colorFrom: blue colorTo: yellow sdk: gradio pinned: false app_file: space.py
gradio_rag_sources
A Gradio custom component to display RAG sources
Installation
pip install gradio_rag_sources
Usage
import gradio as gr
from gradio_rag_sources import RagSourcesTable
from gradio_rag_sources import _RagSource as RagSource
with gr.Blocks() as demo:
sources = [
RagSource(
url="https://www.idris.fr",
retrievalScore=0.45,
rerankScore=0.9,
),
RagSource(
url="https://www.google.fr",
retrievalScore=0.45,
rerankScore=0.95,
),
RagSource(
url="https://www.pytorch.org",
retrievalScore=0.55,
rerankScore=0.8,
),
]
RagSourcesTable(value=sources)
if __name__ == "__main__":
demo.launch()
RagSourcesTable
Initialization
name | type | default | description |
---|---|---|---|
value |
Any
|
None |
None |
label |
str | None
|
None |
None |
info |
str | None
|
None |
None |
show_label |
bool | None
|
None |
None |
container |
bool
|
True |
None |
scale |
int | None
|
None |
None |
min_width |
int | None
|
None |
None |
interactive |
bool | None
|
None |
None |
visible |
bool
|
True |
None |
elem_id |
str | None
|
None |
None |
elem_classes |
list[str] | str | None
|
None |
None |
render |
bool
|
True |
None |
key |
int | str | None
|
None |
None |
load_fn |
Callable | None
|
None |
None |
every |
Timer | float | None
|
None |
None |
inputs |
Component | Sequence[Component] | set[Component] | None
|
None |
None |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gradio_rag_sources-0.1.2.tar.gz
(77.2 kB
view details)
Built Distribution
File details
Details for the file gradio_rag_sources-0.1.2.tar.gz
.
File metadata
- Download URL: gradio_rag_sources-0.1.2.tar.gz
- Upload date:
- Size: 77.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7301d52a258e0621bf98e9fc7e8dfd3e3a9d862dd9a032e692569d36e2100c09 |
|
MD5 | da5123bc8448cd7a348a269c3062c989 |
|
BLAKE2b-256 | b614b86b31b4ab2c52fa85983e8077ad6383f7f13ae905b9a1601ad2c1f93018 |
File details
Details for the file gradio_rag_sources-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: gradio_rag_sources-0.1.2-py3-none-any.whl
- Upload date:
- Size: 36.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82ab9c2a059d1e67b8dd6df18f2f5b5e8a9d480565e0907f93e3f1b911612112 |
|
MD5 | a416f530dac5463ce156445e1fd5c69e |
|
BLAKE2b-256 | 1e7610587cc77f0e0ae98a064e41087570ab9b8d2007361e4c6e556f36b58654 |