Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import subprocess
|
3 |
+
import psutil
|
4 |
+
|
5 |
+
def app(voice):
|
6 |
+
cpu_percent = psutil.cpu_percent()
|
7 |
+
memory_info = psutil.virtual_memory()
|
8 |
+
memory_percent = memory_info.percent
|
9 |
+
return cpu_percent, memory_percent
|
10 |
+
|
11 |
+
|
12 |
+
iface = gr.Interface(fn=app, inputs=None, outputs="text", live=True)
|
13 |
+
iface.launch()
|