xmen9654 commited on
Commit
dd6ba28
1 Parent(s): d6035c3

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
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()