Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
xiaoshi
/
test
like
1
Runtime error
App
Files
Files
Community
fdfae9f
test
/
app.py
liujinyao
print device count
fdfae9f
over 2 years ago
raw
history
blame
166 Bytes
import
torch
import
gradio
as
gr
def
greet
(
name
):
return
torch.cuda.device_count()
iface = gr.Interface(fn=greet, inputs=
"text"
, outputs=
"text"
)
iface.launch()