multimodalart HF Staff commited on
Commit
a93e972
·
verified ·
1 Parent(s): 769a6e3

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,8 +20,8 @@ print(f"After chatterbox import: cuda_available={torch.cuda.is_available()}")
20
  import gradio as gr
21
 
22
  @spaces.GPU(duration=60)
23
- def test_gpu():
24
- return f"CUDA available: {torch.cuda.is_available()}, device count: {torch.cuda.device_count()}"
25
 
26
  demo = gr.Interface(fn=test_gpu, inputs=gr.Textbox(value="test"), outputs=gr.Textbox())
27
- demo.launch(mcp_server=True)
 
20
  import gradio as gr
21
 
22
  @spaces.GPU(duration=60)
23
+ def test_gpu(text):
24
+ return f"CUDA available: {torch.cuda.is_available()}, device count: {torch.cuda.device_count()}, device name: {torch.cuda.get_device_name(0)}"
25
 
26
  demo = gr.Interface(fn=test_gpu, inputs=gr.Textbox(value="test"), outputs=gr.Textbox())
27
+ demo.launch(mcp_server=True)