Skip to main content

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

PyPI - Version Static Badge

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


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.3.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gradio_rag_sources-0.1.3-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file gradio_rag_sources-0.1.3.tar.gz.

File metadata

  • Download URL: gradio_rag_sources-0.1.3.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gradio_rag_sources-0.1.3.tar.gz
Algorithm Hash digest
SHA256 13602d7d2d7c8a4227f02e82a4b05516efc6a5ec976c0a6471a952c1021bc278
MD5 a6b717500829a45a99c010695383d27c
BLAKE2b-256 ae546eb8c1a68ce06ea2e5430d4b45fc7d21603838bad0130543957609518a02

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradio_rag_sources-0.1.3.tar.gz:

Publisher: release.yml on ncassereau/gradio_rag_sources

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gradio_rag_sources-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gradio_rag_sources-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 80123fa783643550ac01a95ab9cf905fcf8e3bd502e267a005454523f941f117
MD5 4aa46e24aec55ddcd3a29620730d2859
BLAKE2b-256 0cb89bdff3a8faf0cedf0573e7e69a32c0e9b08e787fd36e55796650b2433a6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradio_rag_sources-0.1.3-py3-none-any.whl:

Publisher: release.yml on ncassereau/gradio_rag_sources

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page