homer-meng commited on
Commit
a543549
·
1 Parent(s): f30bb9e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import torch
3
+
4
+ st.title("Hugging Face Space GPU Info")
5
+
6
+ # Check if GPU is available
7
+ gpu_available = torch.cuda.is_available()
8
+
9
+ if gpu_available:
10
+ gpu_name = torch.cuda.get_device_name(0)
11
+ st.write(f"GPU available: {gpu_name}")
12
+ else:
13
+ st.write("No GPU available")