Spaces:
Paused
Paused
Download venv/lib/python3.13/site-packages/gradio/components/fallback.py from Jacanteros/mi_transcriptor: direct link, hf CLI and curl.
- Browser
- Download file 994 Bytes
-
https://huggingface.co/spaces/Jacanteros/mi_transcriptor/resolve/main/venv/lib/python3.13/site-packages/gradio/components/fallback.py
- Command line
-
hf download hf://spaces/Jacanteros/mi_transcriptor/venv/lib/python3.13/site-packages/gradio/components/fallback.py
-
curl -L -o fallback.py https://huggingface.co/spaces/Jacanteros/mi_transcriptor/resolve/main/venv/lib/python3.13/site-packages/gradio/components/fallback.py
994 Bytes
| from gradio.components.base import Component | |
| class Fallback(Component): | |
| 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"} | |