Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mport torch
|
| 2 |
+
import gradio as gr
|
| 3 |
|
| 4 |
+
def check_gpu(_):
|
| 5 |
+
if torch.cuda.is_available():
|
| 6 |
+
return f"✅ GPU detected: {torch.cuda.get_device_name(0)}"
|
| 7 |
+
else:
|
| 8 |
+
return "❌ No GPU yet. Try refreshing."
|
| 9 |
+
|
| 10 |
+
gr.Interface(fn=check_gpu, inputs="text", outputs="text").launch()
|