ZeroSSH / app.py
The Super SafeTensors-GGML Guy
Update app.py
daaa377 verified
Raw History Blame Contribute Delete
1.04 kB
import gradio as gr
import spaces
import torch
@spaces.GPU
def gpu_test():
# Placeholder for the future SSH functionality
if torch.cuda.is_available():
gpu = torch.cuda.get_device_name(0)
return (
"πŸš€ Free SSH for ZeroGPU!\n\n"
"πŸ› οΈ Dev Mode enabled\n"
"πŸ” SSH access is provided through Space Dev Mode.\n"
"πŸ§ͺ GPU test is currently being used as a placeholder.\n\n"
f"GPU: {gpu}"
)
return (
"πŸš€ Free SSH for ZeroGPU!\n\n"
"πŸ› οΈ Dev Mode enabled\n"
"πŸ” SSH access is provided through Space Dev Mode.\n"
"πŸ§ͺ GPU test is currently being used as a placeholder.\n\n"
"No GPU allocated."
)
demo = gr.Interface(
fn=gpu_test,
inputs=[],
outputs=gr.Textbox(label="Status"),
title="πŸš€ Free SSH for ZeroGPU!",
description=(
"Hugging Face Space Dev Mode provides SSH access. "
"The GPU test is only a placeholder for now."
),
)
demo.launch()