Spaces:
Sleeping
Sleeping
Download app.py from Plugiloinc/gpuggraph3d: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/spaces/Plugiloinc/gpuggraph3d/resolve/main/app.py
- Command line
-
hf download hf://spaces/Plugiloinc/gpuggraph3d/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Plugiloinc/gpuggraph3d/resolve/main/app.py
281 Bytes
| import torch | |
| import gradio as gr | |
| def check_gpu(_): | |
| if torch.cuda.is_available(): | |
| return f"✅ GPU detected: {torch.cuda.get_device_name(0)}" | |
| else: | |
| return "❌ No GPU yet. Try refreshing." | |
| gr.Interface(fn=check_gpu, inputs="text", outputs="text").launch() |