Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
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)
|