Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,6 @@
|
|
1 |
import torch
|
2 |
-
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
iface = gr.Interface(
|
10 |
-
fn=check_gpu,
|
11 |
-
inputs=[],
|
12 |
-
outputs="text",
|
13 |
-
title="GPU Test",
|
14 |
-
description="Click to check GPU availability."
|
15 |
-
)
|
16 |
-
|
17 |
-
iface.launch(server_name="0.0.0.0", server_port=7860, share=True, debug=True)
|
|
|
1 |
import torch
|
|
|
2 |
|
3 |
+
if torch.cuda.is_available():
|
4 |
+
print("✅ GPU is available:", torch.cuda.get_device_name(0))
|
5 |
+
else:
|
6 |
+
print("❌ No GPU detected!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|