gradio-leaderboard 0.0.12rc0__tar.gz → 0.0.13__tar.gz

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.
Files changed (39) hide show
  1. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/PKG-INFO +2 -2
  2. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/backend/gradio_leaderboard/leaderboard.pyi +79 -66
  3. gradio_leaderboard-0.0.13/backend/gradio_leaderboard/templates/component/index.js +33757 -0
  4. gradio_leaderboard-0.0.13/backend/gradio_leaderboard/templates/component/style.css +1 -0
  5. gradio_leaderboard-0.0.13/backend/gradio_leaderboard/templates/example/index.js +397 -0
  6. gradio_leaderboard-0.0.13/dist.bak/gradio_leaderboard-0.0.11-py3-none-any.whl +0 -0
  7. gradio_leaderboard-0.0.13/dist.bak/gradio_leaderboard-0.0.11.tar.gz +0 -0
  8. gradio_leaderboard-0.0.13/frontend/package-lock.json +5589 -0
  9. gradio_leaderboard-0.0.13/frontend/package.json +45 -0
  10. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/pyproject.toml +3 -3
  11. gradio_leaderboard-0.0.12rc0/backend/gradio_leaderboard/templates/component/__vite-browser-external-2447137e.js +0 -4
  12. gradio_leaderboard-0.0.12rc0/backend/gradio_leaderboard/templates/component/index.js +0 -29471
  13. gradio_leaderboard-0.0.12rc0/backend/gradio_leaderboard/templates/component/style.css +0 -1
  14. gradio_leaderboard-0.0.12rc0/backend/gradio_leaderboard/templates/component/wrapper-6f348d45-19fa94bf.js +0 -2453
  15. gradio_leaderboard-0.0.12rc0/backend/gradio_leaderboard/templates/example/index.js +0 -335
  16. gradio_leaderboard-0.0.12rc0/frontend/package-lock.json +0 -1347
  17. gradio_leaderboard-0.0.12rc0/frontend/package.json +0 -38
  18. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/.gitignore +0 -0
  19. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/README.md +0 -0
  20. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/backend/gradio_leaderboard/__init__.py +0 -0
  21. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/backend/gradio_leaderboard/leaderboard.py +0 -0
  22. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/backend/gradio_leaderboard/templates/example/style.css +0 -0
  23. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/__init__.py +0 -0
  24. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/app.py +0 -0
  25. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/config.py +0 -0
  26. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/css.css +0 -0
  27. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/docs.md +0 -0
  28. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/leaderboard_data.json +0 -0
  29. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/demo/space.py +0 -0
  30. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/Example.svelte +0 -0
  31. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/Index.svelte +0 -0
  32. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/Checkboxgroup.svelte +0 -0
  33. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/EditableCell.svelte +0 -0
  34. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/Example.svelte +0 -0
  35. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/RangeSlider.svelte +0 -0
  36. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/SimpleTextbox.svelte +0 -0
  37. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/Table.svelte +0 -0
  38. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/VirtualTable.svelte +0 -0
  39. {gradio_leaderboard-0.0.12rc0 → gradio_leaderboard-0.0.13}/frontend/shared/utils.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gradio_leaderboard
3
- Version: 0.0.12rc0
3
+ Version: 0.0.13
4
4
  Summary: Super fast , batteries included Leaderboard component ⚡️
5
5
  Author-email: YOUR NAME <YOUREMAIL@domain.com>
6
6
  License-Expression: MIT
@@ -18,7 +18,7 @@ Classifier: Topic :: Scientific/Engineering
18
18
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
19
  Classifier: Topic :: Scientific/Engineering :: Visualization
20
20
  Requires-Python: >=3.8
21
- Requires-Dist: gradio<5.0,>=4.0
21
+ Requires-Dist: gradio<6.0,>=4.0
22
22
  Provides-Extra: dev
23
23
  Requires-Dist: build; extra == 'dev'
24
24
  Requires-Dist: twine; extra == 'dev'
@@ -397,12 +397,16 @@ class Leaderboard(Component):
397
397
 
398
398
  def example_value(self) -> Any:
399
399
  return {"headers": ["a", "b"], "data": [["foo", "bar"]]}
400
+ from typing import Callable, Literal, Sequence, Any, TYPE_CHECKING
401
+ from gradio.blocks import Block
402
+ if TYPE_CHECKING:
403
+ from gradio.components import Timer
400
404
 
401
405
 
402
406
  def change(self,
403
- fn: Callable | None,
404
- inputs: Component | Sequence[Component] | set[Component] | None = None,
405
- outputs: Component | Sequence[Component] | None = None,
407
+ fn: Callable[..., Any] | None = None,
408
+ inputs: Block | Sequence[Block] | set[Block] | None = None,
409
+ outputs: Block | Sequence[Block] | None = None,
406
410
  api_name: str | None | Literal[False] = None,
407
411
  scroll_to_output: bool = False,
408
412
  show_progress: Literal["full", "minimal", "hidden"] = "full",
@@ -412,39 +416,42 @@ class Leaderboard(Component):
412
416
  preprocess: bool = True,
413
417
  postprocess: bool = True,
414
418
  cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
415
- every: float | None = None,
419
+ every: Timer | float | None = None,
416
420
  trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
417
421
  js: str | None = None,
418
422
  concurrency_limit: int | None | Literal["default"] = "default",
419
423
  concurrency_id: str | None = None,
420
- show_api: bool = True) -> Dependency:
424
+ show_api: bool = True,
425
+
426
+ ) -> Dependency:
421
427
  """
422
428
  Parameters:
423
429
  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.
424
- inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
425
- outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
426
- 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, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
427
- scroll_to_output: If True, will scroll to output component on completion
428
- show_progress: If True, will show progress animation while pending
429
- 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.
430
- 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.
431
- max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
432
- preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
433
- postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
434
- cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
435
- every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds.
436
- trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
437
- js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
438
- 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).
439
- 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.
440
- 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 to use this event. If fn is None, show_api will automatically be set to False.
430
+ inputs: list of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
431
+ 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, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
433
+ scroll_to_output: if True, will scroll to output component on completion
434
+ 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
435
+ 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
+ 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
+ max_batch_size: maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
438
+ preprocess: if False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
439
+ postprocess: if False, will not run postprocessing of component data before returning 'fn' output to the browser.
440
+ cancels: a list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
441
+ every: continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
442
+ trigger_mode: if "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
443
+ js: optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
444
+ 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
+ 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
+ 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.
447
+
441
448
  """
442
449
  ...
443
450
 
444
451
  def input(self,
445
- fn: Callable | None,
446
- inputs: Component | Sequence[Component] | set[Component] | None = None,
447
- outputs: Component | Sequence[Component] | None = None,
452
+ fn: Callable[..., Any] | None = None,
453
+ inputs: Block | Sequence[Block] | set[Block] | None = None,
454
+ outputs: Block | Sequence[Block] | None = None,
448
455
  api_name: str | None | Literal[False] = None,
449
456
  scroll_to_output: bool = False,
450
457
  show_progress: Literal["full", "minimal", "hidden"] = "full",
@@ -454,39 +461,42 @@ class Leaderboard(Component):
454
461
  preprocess: bool = True,
455
462
  postprocess: bool = True,
456
463
  cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
457
- every: float | None = None,
464
+ every: Timer | float | None = None,
458
465
  trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
459
466
  js: str | None = None,
460
467
  concurrency_limit: int | None | Literal["default"] = "default",
461
468
  concurrency_id: str | None = None,
462
- show_api: bool = True) -> Dependency:
469
+ show_api: bool = True,
470
+
471
+ ) -> Dependency:
463
472
  """
464
473
  Parameters:
465
474
  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.
466
- inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
467
- outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
468
- 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, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
469
- scroll_to_output: If True, will scroll to output component on completion
470
- show_progress: If True, will show progress animation while pending
471
- 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.
472
- 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.
473
- max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
474
- preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
475
- postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
476
- cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
477
- every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds.
478
- trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
479
- js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
480
- 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).
481
- 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.
482
- 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 to use this event. If fn is None, show_api will automatically be set to False.
475
+ inputs: list of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
476
+ 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, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
478
+ scroll_to_output: if True, will scroll to output component on completion
479
+ 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
480
+ 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
+ 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
+ max_batch_size: maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
483
+ preprocess: if False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
484
+ postprocess: if False, will not run postprocessing of component data before returning 'fn' output to the browser.
485
+ cancels: a list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
486
+ every: continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
487
+ trigger_mode: if "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
488
+ js: optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
489
+ 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
+ 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
+ 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.
492
+
483
493
  """
484
494
  ...
485
495
 
486
496
  def select(self,
487
- fn: Callable | None,
488
- inputs: Component | Sequence[Component] | set[Component] | None = None,
489
- outputs: Component | Sequence[Component] | None = None,
497
+ fn: Callable[..., Any] | None = None,
498
+ inputs: Block | Sequence[Block] | set[Block] | None = None,
499
+ outputs: Block | Sequence[Block] | None = None,
490
500
  api_name: str | None | Literal[False] = None,
491
501
  scroll_to_output: bool = False,
492
502
  show_progress: Literal["full", "minimal", "hidden"] = "full",
@@ -496,31 +506,34 @@ class Leaderboard(Component):
496
506
  preprocess: bool = True,
497
507
  postprocess: bool = True,
498
508
  cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
499
- every: float | None = None,
509
+ every: Timer | float | None = None,
500
510
  trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
501
511
  js: str | None = None,
502
512
  concurrency_limit: int | None | Literal["default"] = "default",
503
513
  concurrency_id: str | None = None,
504
- show_api: bool = True) -> Dependency:
514
+ show_api: bool = True,
515
+
516
+ ) -> Dependency:
505
517
  """
506
518
  Parameters:
507
519
  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.
508
- inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
509
- outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
510
- 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, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
511
- scroll_to_output: If True, will scroll to output component on completion
512
- show_progress: If True, will show progress animation while pending
513
- 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.
514
- 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.
515
- max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
516
- preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
517
- postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
518
- cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
519
- every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds.
520
- trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
521
- js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
522
- 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).
523
- 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.
524
- 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 to use this event. If fn is None, show_api will automatically be set to False.
520
+ inputs: list of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
521
+ 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, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
523
+ scroll_to_output: if True, will scroll to output component on completion
524
+ 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
525
+ 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
+ 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
+ max_batch_size: maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
528
+ preprocess: if False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
529
+ postprocess: if False, will not run postprocessing of component data before returning 'fn' output to the browser.
530
+ cancels: a list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
531
+ every: continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
532
+ trigger_mode: if "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
533
+ js: optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
534
+ 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
+ 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
+ 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.
537
+
525
538
  """
526
539
  ...