Spaces:
Sleeping
Sleeping
ask if cuda is avilable
Browse files
app.py
CHANGED
@@ -3,10 +3,10 @@ import torch
|
|
3 |
import streamlit as st
|
4 |
import streamlit_ace
|
5 |
|
6 |
-
|
7 |
for i in range(torch.cuda.device_count()):
|
8 |
st.text(torch.cuda.get_device_properties(i).name)
|
9 |
-
|
10 |
st.text("Could not get device properties")
|
11 |
input_user = ""
|
12 |
with st.form("input code"):
|
|
|
3 |
import streamlit as st
|
4 |
import streamlit_ace
|
5 |
|
6 |
+
if torch.cuda.is_available():
|
7 |
for i in range(torch.cuda.device_count()):
|
8 |
st.text(torch.cuda.get_device_properties(i).name)
|
9 |
+
else:
|
10 |
st.text("Could not get device properties")
|
11 |
input_user = ""
|
12 |
with st.form("input code"):
|