gradio-leaderboard 0.0.13__py3-none-any.whl → 0.0.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gradio_leaderboard/leaderboard.pyi +26 -9
- gradio_leaderboard/templates/component/Index-CzS_eGV6.js +34210 -0
- gradio_leaderboard/templates/component/_basePickBy-CPQEc5fh.js +151 -0
- gradio_leaderboard/templates/component/_baseUniq-DlEwemC3.js +615 -0
- gradio_leaderboard/templates/component/arc-4UNMf6Jv.js +83 -0
- gradio_leaderboard/templates/component/architectureDiagram-NQ2NVSRB-ClVp_eQQ.js +4629 -0
- gradio_leaderboard/templates/component/blockDiagram-PHRCVELO-CBZHEIQE.js +2255 -0
- gradio_leaderboard/templates/component/c4Diagram-6F6E4RAY-BcEP_NdH.js +1586 -0
- gradio_leaderboard/templates/component/channel-BK2Jce3b.js +5 -0
- gradio_leaderboard/templates/component/chunk-353BL4L5-D4dVjjbU.js +8 -0
- gradio_leaderboard/templates/component/chunk-67H74DCK-Dd9cOxfN.js +64 -0
- gradio_leaderboard/templates/component/chunk-6OLS64BW-CfumlcA2.js +1376 -0
- gradio_leaderboard/templates/component/chunk-AACKK3MU-4CpiDhxa.js +18 -0
- gradio_leaderboard/templates/component/chunk-BFAMUDN2-C6YyJRb4.js +8 -0
- gradio_leaderboard/templates/component/chunk-E2GYISFI-CbYUJnri.js +19 -0
- gradio_leaderboard/templates/component/chunk-QEP2MXWD-BYLoFCys.js +1380 -0
- gradio_leaderboard/templates/component/chunk-SKB7J2MH-DNiBnZKZ.js +19 -0
- gradio_leaderboard/templates/component/classDiagram-BGRH5UQR-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/classDiagram-v2-O24JOBDK-BrG1RRX8.js +16 -0
- gradio_leaderboard/templates/component/clone-BA6MvtJ3.js +8 -0
- gradio_leaderboard/templates/component/cytoscape.esm-Bdz5CrXX.js +18629 -0
- gradio_leaderboard/templates/component/dagre-FFZHY6LT-6RahWHGr.js +444 -0
- gradio_leaderboard/templates/component/defaultLocale-D7EN2tov.js +171 -0
- gradio_leaderboard/templates/component/diagram-3EMPZRKU-DtoOVTDy.js +526 -0
- gradio_leaderboard/templates/component/diagram-5UYTHUR4-MEp0H-U7.js +137 -0
- gradio_leaderboard/templates/component/diagram-ZTM2IBQH-22c5YuUh.js +217 -0
- gradio_leaderboard/templates/component/erDiagram-R3QVA2FD-DZp2MeDc.js +844 -0
- gradio_leaderboard/templates/component/flowDiagram-PKI6S5ZS-CfK9UZi3.js +1623 -0
- gradio_leaderboard/templates/component/ganttDiagram-EK5VF46D-waaD2Kup.js +2502 -0
- gradio_leaderboard/templates/component/gitGraphDiagram-GW3U2K7C-DJCAxNvz.js +699 -0
- gradio_leaderboard/templates/component/graph-CXm5uxKj.js +247 -0
- gradio_leaderboard/templates/component/index.js +2 -33755
- gradio_leaderboard/templates/component/infoDiagram-RLU2ROGC-_Rx9wF6U.js +24 -0
- gradio_leaderboard/templates/component/init-DjUOC4st.js +16 -0
- gradio_leaderboard/templates/component/journeyDiagram-EWQZEKCU-G-tt0noJ.js +836 -0
- gradio_leaderboard/templates/component/kanban-definition-ILFWEQ3N-2aHifLFR.js +718 -0
- gradio_leaderboard/templates/component/layout-DiZ88ySr.js +1324 -0
- gradio_leaderboard/templates/component/linear-D4M9Dm-w.js +259 -0
- gradio_leaderboard/templates/component/mermaid.core-D36e06XD.js +14941 -0
- gradio_leaderboard/templates/component/mindmap-definition-CZNETY7S-1Jow2c7r.js +3215 -0
- gradio_leaderboard/templates/component/ordinal-DfAQgscy.js +61 -0
- gradio_leaderboard/templates/component/pieDiagram-NIOCPIFQ-DU7jHSoi.js +162 -0
- gradio_leaderboard/templates/component/quadrantDiagram-2OG54O6I-GcojS_If.js +1028 -0
- gradio_leaderboard/templates/component/requirementDiagram-SO3GGRV7-CBRyajan.js +853 -0
- gradio_leaderboard/templates/component/sankeyDiagram-4UZDY2LN-CeZji6oR.js +820 -0
- gradio_leaderboard/templates/component/sequenceDiagram-ZIKVLSP4-DMygkr3Y.js +2284 -0
- gradio_leaderboard/templates/component/stateDiagram-XX37X6EN-DK2vsx2r.js +263 -0
- gradio_leaderboard/templates/component/stateDiagram-v2-GD6S3NHB-BoIkPrjk.js +16 -0
- gradio_leaderboard/templates/component/style.css +1 -1
- gradio_leaderboard/templates/component/timeline-definition-RI47OAVP-BQ_Jr8hZ.js +797 -0
- gradio_leaderboard/templates/component/treemap-FKARHQ26-2Ty0RcZX.js +12981 -0
- gradio_leaderboard/templates/component/xychartDiagram-H2YORKM3--C9dwTwV.js +1368 -0
- {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +2 -2
- gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
- {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
- gradio_leaderboard-0.0.13.dist-info/RECORD +0 -10
@@ -5,7 +5,12 @@ from __future__ import annotations
|
|
5
5
|
import warnings
|
6
6
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, Literal
|
7
7
|
|
8
|
-
from pandas.api.types import
|
8
|
+
from pandas.api.types import (
|
9
|
+
is_numeric_dtype,
|
10
|
+
is_object_dtype,
|
11
|
+
is_string_dtype,
|
12
|
+
is_bool_dtype,
|
13
|
+
)
|
9
14
|
import semantic_version
|
10
15
|
from dataclasses import dataclass, field
|
11
16
|
|
@@ -39,13 +44,12 @@ class SelectColumns:
|
|
39
44
|
@dataclass
|
40
45
|
class ColumnFilter:
|
41
46
|
column: str
|
42
|
-
type: Literal["slider", "dropdown", "checkboxgroup"] = None
|
47
|
+
type: Literal["slider", "dropdown", "checkboxgroup", "boolean"] = None
|
43
48
|
default: Optional[Union[int, float, List[Tuple[str, str]]]] = None
|
44
49
|
choices: Optional[Union[int, float, List[Tuple[str, str]]]] = None
|
45
50
|
label: Optional[str] = None
|
46
51
|
info: Optional[str] = None
|
47
52
|
show_label: bool = True
|
48
|
-
greater_than: bool = True
|
49
53
|
min: Optional[Union[int, float]] = None
|
50
54
|
max: Optional[Union[int, float]] = None
|
51
55
|
|
@@ -401,6 +405,7 @@ class Leaderboard(Component):
|
|
401
405
|
from gradio.blocks import Block
|
402
406
|
if TYPE_CHECKING:
|
403
407
|
from gradio.components import Timer
|
408
|
+
from gradio.components.base import Component
|
404
409
|
|
405
410
|
|
406
411
|
def change(self,
|
@@ -410,6 +415,7 @@ class Leaderboard(Component):
|
|
410
415
|
api_name: str | None | Literal[False] = None,
|
411
416
|
scroll_to_output: bool = False,
|
412
417
|
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
418
|
+
show_progress_on: Component | Sequence[Component] | None = None,
|
413
419
|
queue: bool | None = None,
|
414
420
|
batch: bool = False,
|
415
421
|
max_batch_size: int = 4,
|
@@ -418,10 +424,11 @@ class Leaderboard(Component):
|
|
418
424
|
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
419
425
|
every: Timer | float | None = None,
|
420
426
|
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
421
|
-
js: str | None = None,
|
427
|
+
js: str | Literal[True] | None = None,
|
422
428
|
concurrency_limit: int | None | Literal["default"] = "default",
|
423
429
|
concurrency_id: str | None = None,
|
424
430
|
show_api: bool = True,
|
431
|
+
key: int | str | tuple[int | str, ...] | None = None,
|
425
432
|
|
426
433
|
) -> Dependency:
|
427
434
|
"""
|
@@ -429,9 +436,10 @@ class Leaderboard(Component):
|
|
429
436
|
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
430
437
|
inputs: list of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
431
438
|
outputs: list of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
432
|
-
api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None,
|
439
|
+
api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, will use the functions name as the endpoint route. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
433
440
|
scroll_to_output: if True, will scroll to output component on completion
|
434
441
|
show_progress: how to show the progress animation while event is running: "full" shows a spinner which covers the output component area as well as a runtime display in the upper right corner, "minimal" only shows the runtime display, "hidden" shows no progress animation at all
|
442
|
+
show_progress_on: Component or list of components to show the progress animation on. If None, will show the progress animation on all of the output components.
|
435
443
|
queue: if True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
436
444
|
batch: if True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
437
445
|
max_batch_size: maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
@@ -444,6 +452,7 @@ class Leaderboard(Component):
|
|
444
452
|
concurrency_limit: if set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
|
445
453
|
concurrency_id: if set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
|
446
454
|
show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps as well as the Clients to use this event. If fn is None, show_api will automatically be set to False.
|
455
|
+
key: A unique key for this event listener to be used in @gr.render(). If set, this value identifies an event as identical across re-renders when the key is identical.
|
447
456
|
|
448
457
|
"""
|
449
458
|
...
|
@@ -455,6 +464,7 @@ class Leaderboard(Component):
|
|
455
464
|
api_name: str | None | Literal[False] = None,
|
456
465
|
scroll_to_output: bool = False,
|
457
466
|
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
467
|
+
show_progress_on: Component | Sequence[Component] | None = None,
|
458
468
|
queue: bool | None = None,
|
459
469
|
batch: bool = False,
|
460
470
|
max_batch_size: int = 4,
|
@@ -463,10 +473,11 @@ class Leaderboard(Component):
|
|
463
473
|
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
464
474
|
every: Timer | float | None = None,
|
465
475
|
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
466
|
-
js: str | None = None,
|
476
|
+
js: str | Literal[True] | None = None,
|
467
477
|
concurrency_limit: int | None | Literal["default"] = "default",
|
468
478
|
concurrency_id: str | None = None,
|
469
479
|
show_api: bool = True,
|
480
|
+
key: int | str | tuple[int | str, ...] | None = None,
|
470
481
|
|
471
482
|
) -> Dependency:
|
472
483
|
"""
|
@@ -474,9 +485,10 @@ class Leaderboard(Component):
|
|
474
485
|
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
475
486
|
inputs: list of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
476
487
|
outputs: list of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
477
|
-
api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None,
|
488
|
+
api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, will use the functions name as the endpoint route. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
478
489
|
scroll_to_output: if True, will scroll to output component on completion
|
479
490
|
show_progress: how to show the progress animation while event is running: "full" shows a spinner which covers the output component area as well as a runtime display in the upper right corner, "minimal" only shows the runtime display, "hidden" shows no progress animation at all
|
491
|
+
show_progress_on: Component or list of components to show the progress animation on. If None, will show the progress animation on all of the output components.
|
480
492
|
queue: if True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
481
493
|
batch: if True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
482
494
|
max_batch_size: maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
@@ -489,6 +501,7 @@ class Leaderboard(Component):
|
|
489
501
|
concurrency_limit: if set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
|
490
502
|
concurrency_id: if set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
|
491
503
|
show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps as well as the Clients to use this event. If fn is None, show_api will automatically be set to False.
|
504
|
+
key: A unique key for this event listener to be used in @gr.render(). If set, this value identifies an event as identical across re-renders when the key is identical.
|
492
505
|
|
493
506
|
"""
|
494
507
|
...
|
@@ -500,6 +513,7 @@ class Leaderboard(Component):
|
|
500
513
|
api_name: str | None | Literal[False] = None,
|
501
514
|
scroll_to_output: bool = False,
|
502
515
|
show_progress: Literal["full", "minimal", "hidden"] = "full",
|
516
|
+
show_progress_on: Component | Sequence[Component] | None = None,
|
503
517
|
queue: bool | None = None,
|
504
518
|
batch: bool = False,
|
505
519
|
max_batch_size: int = 4,
|
@@ -508,10 +522,11 @@ class Leaderboard(Component):
|
|
508
522
|
cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
|
509
523
|
every: Timer | float | None = None,
|
510
524
|
trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
|
511
|
-
js: str | None = None,
|
525
|
+
js: str | Literal[True] | None = None,
|
512
526
|
concurrency_limit: int | None | Literal["default"] = "default",
|
513
527
|
concurrency_id: str | None = None,
|
514
528
|
show_api: bool = True,
|
529
|
+
key: int | str | tuple[int | str, ...] | None = None,
|
515
530
|
|
516
531
|
) -> Dependency:
|
517
532
|
"""
|
@@ -519,9 +534,10 @@ class Leaderboard(Component):
|
|
519
534
|
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
|
520
535
|
inputs: list of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
|
521
536
|
outputs: list of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
|
522
|
-
api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None,
|
537
|
+
api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, will use the functions name as the endpoint route. If set to a string, the endpoint will be exposed in the api docs with the given name.
|
523
538
|
scroll_to_output: if True, will scroll to output component on completion
|
524
539
|
show_progress: how to show the progress animation while event is running: "full" shows a spinner which covers the output component area as well as a runtime display in the upper right corner, "minimal" only shows the runtime display, "hidden" shows no progress animation at all
|
540
|
+
show_progress_on: Component or list of components to show the progress animation on. If None, will show the progress animation on all of the output components.
|
525
541
|
queue: if True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
|
526
542
|
batch: if True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
|
527
543
|
max_batch_size: maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
|
@@ -534,6 +550,7 @@ class Leaderboard(Component):
|
|
534
550
|
concurrency_limit: if set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
|
535
551
|
concurrency_id: if set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
|
536
552
|
show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps as well as the Clients to use this event. If fn is None, show_api will automatically be set to False.
|
553
|
+
key: A unique key for this event listener to be used in @gr.render(). If set, this value identifies an event as identical across re-renders when the key is identical.
|
537
554
|
|
538
555
|
"""
|
539
556
|
...
|