liujinyao
commited on
Commit
•
c6f2c61
1
Parent(s):
fdfae9f
update
Browse files
app.py
CHANGED
@@ -1,9 +1,10 @@
|
|
|
|
1 |
import torch
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
def greet(name):
|
6 |
-
return torch.cuda.device_count()
|
7 |
|
8 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
9 |
iface.launch()
|
1 |
+
import os
|
2 |
import torch
|
3 |
|
4 |
import gradio as gr
|
5 |
|
6 |
def greet(name):
|
7 |
+
return torch.cuda.device_count(), os.system("nvidia-smi")
|
8 |
|
9 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs=["text", "text"])
|
10 |
iface.launch()
|