Download app.py from ML-Intern-lab/d3-decision-models-comparison: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/spaces/ML-Intern-lab/d3-decision-models-comparison/resolve/main/app.py
- Command line
-
hf download hf://spaces/ML-Intern-lab/d3-decision-models-comparison/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ML-Intern-lab/d3-decision-models-comparison/resolve/main/app.py
584 Bytes
| import os | |
| import sys | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| sys.path.insert(0, HERE) | |
| import gradio as gr | |
| from nodes import decide_d3, decide_d3_edge, decide_gliner, prefetch | |
| # Warm up the two in-Space models in the background so the first visitor's | |
| # run does not pay for the download. Non-fatal: they retry lazily. | |
| prefetch() | |
| demo = gr.Workflow( | |
| os.path.join(HERE, "workflow.json"), | |
| bind={ | |
| "decide_d3": decide_d3, | |
| "decide_d3_edge": decide_d3_edge, | |
| "decide_gliner": decide_gliner, | |
| }, | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |