Tony Shepherd commited on
Commit
96d04d4
·
1 Parent(s): 9b85f5e

torch code to inspect version and device availability

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -1,4 +1,17 @@
1
  import streamlit as st
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ # x = st.slider('Select a value')
4
+ # st.write(x, 'squared is', x * x)
5
+
6
+ import torch
7
+
8
+ print(torch.__version__)
9
+
10
+ st.write("torch version: " + torch.__version__)
11
+ st.write(" ")
12
+ st.write("cuda available: " + torch.cuda.is_available())
13
+ st.write(" ")
14
+ st.write("No of GPUs: " + torch.cuda.device_count())
15
+ st.write(" ")
16
+ st.write("device name: " + torch.cuda.get_device_name())
17
+