File size: 281 Bytes
9c89958
c30bba4
d02cdd2
c30bba4
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import torch
import gradio as gr

def check_gpu(_):
    if torch.cuda.is_available():
        return f"βœ… GPU detected: {torch.cuda.get_device_name(0)}"
    else:
        return "❌ No GPU yet. Try refreshing."

gr.Interface(fn=check_gpu, inputs="text", outputs="text").launch()