tool / app.py
crittiksglobal's picture
Upload app.py with huggingface_hub
becd09b verified
raw
history blame contribute delete
556 Bytes
import gradio as gr
import torch
import os
os.makedirs("/tmp/gradio", exist_ok=True)
def test_gpu():
if torch.cuda.is_available():
return f"GPU: {torch.cuda.get_device_name(0)}\nVRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB"
return "No GPU found"
with gr.Blocks(title="VertexElite AI") as demo:
gr.Markdown("# VertexElite AI Tool Trainer")
gr.Markdown("Testing T4 GPU...")
btn = gr.Button("Check GPU")
output = gr.Textbox(label="GPU Info")
btn.click(test_gpu, outputs=output)
demo.launch()