homer-meng commited on
Commit
0d72f2c
·
1 Parent(s): a72929e

Delete test.py

Browse files
Files changed (1) hide show
  1. test.py +0 -21
test.py DELETED
@@ -1,21 +0,0 @@
1
- import streamlit as st
2
- import subprocess
3
- import torch
4
-
5
-
6
- def app():
7
- st.title("Hugging Face Space GPU Info")
8
-
9
- # Check if GPU is available
10
- gpu_available = torch.cuda.is_available()
11
-
12
- if gpu_available:
13
- gpu_name = torch.cuda.get_device_name(0)
14
- st.write(f"GPU available: {gpu_name}")
15
- else:
16
- st.write("No GPU available")
17
-
18
- # Ping the server
19
- st.title("Server Ping")
20
- ping_output = subprocess.check_output(["ping", "-c", "4", "google.com"])
21
- st.write("Ping output:\n", ping_output.decode("utf-8"))