Spaces:
Running on Zero
Running on Zero
Download probe_app.py from hugging-apps/codecsplat: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/spaces/hugging-apps/codecsplat/resolve/main/probe_app.py
- Command line
-
hf download hf://spaces/hugging-apps/codecsplat/probe_app.py
-
curl -L -o probe_app.py https://huggingface.co/spaces/hugging-apps/codecsplat/resolve/main/probe_app.py
477 Bytes
| """Minimal ZeroGPU probe (diagnostics only).""" | |
| import os | |
| import spaces | |
| import torch | |
| import gradio as gr | |
| _t = torch.zeros(4).to("cuda") | |
| def gpu_probe() -> str: | |
| """Report the GPU visible to the ZeroGPU worker.""" | |
| return f"{torch.cuda.get_device_name()} | {_t.device} | torch {torch.__version__}" | |
| with gr.Blocks() as demo: | |
| b = gr.Button("probe") | |
| o = gr.Textbox() | |
| b.click(gpu_probe, outputs=o, api_name="gpu_probe") | |
| demo.launch() | |