Spaces:
Sleeping
Sleeping
remove extra logging
Browse files
app.py
CHANGED
|
@@ -102,17 +102,14 @@ import torch, sys
|
|
| 102 |
try:
|
| 103 |
cuda_ = torch.cuda.is_available()
|
| 104 |
print("CUDA:", cuda_)
|
| 105 |
-
logger.info("CUDA:", cuda_)
|
| 106 |
if cuda_:
|
| 107 |
if "gpu_check" not in st.session_state:
|
| 108 |
st.write(f"Device: {torch.cuda.get_device_name(0)}")
|
| 109 |
print("Device:", torch.cuda.get_device_name(0))
|
| 110 |
-
logger.info(f"Device: {torch.cuda.get_device_name(0)}")
|
| 111 |
except Exception as e:
|
| 112 |
if "gpu_check" not in st.session_state:
|
| 113 |
st.write(f"GPU check skipped: {e.__str__()}")
|
| 114 |
traceback.print_exc()
|
| 115 |
-
logger.error(f"GPU check skipped: {e.__str__()}")
|
| 116 |
print("GPU check skipped:", e, file=sys.stderr)
|
| 117 |
finally:
|
| 118 |
st.session_state.gpu_check = True
|
|
|
|
| 102 |
try:
|
| 103 |
cuda_ = torch.cuda.is_available()
|
| 104 |
print("CUDA:", cuda_)
|
|
|
|
| 105 |
if cuda_:
|
| 106 |
if "gpu_check" not in st.session_state:
|
| 107 |
st.write(f"Device: {torch.cuda.get_device_name(0)}")
|
| 108 |
print("Device:", torch.cuda.get_device_name(0))
|
|
|
|
| 109 |
except Exception as e:
|
| 110 |
if "gpu_check" not in st.session_state:
|
| 111 |
st.write(f"GPU check skipped: {e.__str__()}")
|
| 112 |
traceback.print_exc()
|
|
|
|
| 113 |
print("GPU check skipped:", e, file=sys.stderr)
|
| 114 |
finally:
|
| 115 |
st.session_state.gpu_check = True
|