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 hashes)
Built Distribution
Close
Hashes for gradio_rag_sources-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82ab9c2a059d1e67b8dd6df18f2f5b5e8a9d480565e0907f93e3f1b911612112 |
|
MD5 | a416f530dac5463ce156445e1fd5c69e |
|
BLAKE2b-256 | 1e7610587cc77f0e0ae98a064e41087570ab9b8d2007361e4c6e556f36b58654 |