File size: 331 Bytes
a72929e
 
 
5893f63
a72929e
 
 
 
 
 
 
 
 
88c9f57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import streamlit as st
import subprocess
import torch

st.title("Hugging Face Space GPU Info")

# Check if GPU is available
gpu_available = torch.cuda.is_available()

if gpu_available:
    gpu_name = torch.cuda.get_device_name(0)
    st.write(f"GPU available: {gpu_name}")
else:
    st.write("No GPU available for Rainbow Canvas")