space-test / app.py
Tony Shepherd
torch code to inspect version and device availability
96d04d4
raw
history blame
392 Bytes
import streamlit as st
# x = st.slider('Select a value')
# st.write(x, 'squared is', x * x)
import torch
print(torch.__version__)
st.write("torch version: " + torch.__version__)
st.write(" ")
st.write("cuda available: " + torch.cuda.is_available())
st.write(" ")
st.write("No of GPUs: " + torch.cuda.device_count())
st.write(" ")
st.write("device name: " + torch.cuda.get_device_name())