Spaces:
Sleeping
Sleeping
Download run.py from hmb/pending-node: direct link, hf CLI and curl.
- Browser
- Download file 548 Bytes
-
https://huggingface.co/spaces/hmb/pending-node/resolve/main/run.py
- Command line
-
hf download hf://spaces/hmb/pending-node/run.py
-
curl -L -o run.py https://huggingface.co/spaces/hmb/pending-node/resolve/main/run.py
548 Bytes
| import gradio as gr | |
| def reverse(text: str) -> str: | |
| return (text or "")[::-1] | |
| # Three outputs ("Reversed", "Generated" and "Image") fed by a shared "Text" | |
| # input: a local function, a HF Inference model and a HF Space. Because they | |
| # form a single connected subgraph, they're exposed as ONE API endpoint that | |
| # returns all three outputs as a tuple — see the "View API" panel in the app, | |
| # or connect with the gradio_client. | |
| demo = gr.Workflow(graph="workflow.json", bind={"reverse": reverse}) | |
| if __name__ == "__main__": | |
| demo.launch() | |