Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /gradio-app_gradio /gradio /components /fallback.py
| from gradio.components.base import Component | |
| from gradio.events import Events | |
| class Fallback(Component): | |
| EVENTS = [Events.change] | |
| def preprocess(self, payload): | |
| """ | |
| This docstring is used to generate the docs for this custom component. | |
| Parameters: | |
| payload: the data to be preprocessed, sent from the frontend | |
| Returns: | |
| the data after preprocessing, sent to the user's function in the backend | |
| """ | |
| return payload | |
| def postprocess(self, value): | |
| """ | |
| This docstring is used to generate the docs for this custom component. | |
| Parameters: | |
| payload: the data to be postprocessed, sent from the user's function in the backend | |
| Returns: | |
| the data after postprocessing, sent to the frontend | |
| """ | |
| return value | |
| def example_payload(self): | |
| return {"foo": "bar"} | |
| def example_value(self): | |
| return {"foo": "bar"} | |
| def api_info(self): | |
| return {"type": {}, "description": "any valid json"} | |
Xet Storage Details
- Size:
- 1.06 kB
- Xet hash:
- 094dea977072c0c9eb2a917b76cae4c89737bf7e125692bb728ef3c02dc0e023
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.