demo 1
Browse files
app.py
CHANGED
@@ -1,13 +1,23 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
|
|
|
|
|
|
3 |
|
|
|
|
|
|
|
|
|
4 |
|
5 |
@spaces.GPU
|
6 |
def gpu():
|
7 |
-
|
|
|
|
|
8 |
|
9 |
def nogpu():
|
10 |
-
|
|
|
11 |
|
12 |
|
13 |
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
+
import platform
|
4 |
+
import os;
|
5 |
+
import socket;
|
6 |
|
7 |
+
def sysinfo():
|
8 |
+
return f"""
|
9 |
+
hostname: {platform.node()} {{socket.gethostname()}}
|
10 |
+
""";
|
11 |
|
12 |
@spaces.GPU
|
13 |
def gpu():
|
14 |
+
|
15 |
+
return sysinfo();
|
16 |
+
|
17 |
|
18 |
def nogpu():
|
19 |
+
|
20 |
+
return sysinfo();
|
21 |
|
22 |
|
23 |
|