import gradio as gr import subprocess import psutil def app(voice): cpu_percent = psutil.cpu_percent() memory_info = psutil.virtual_memory() memory_percent = memory_info.percent return cpu_percent, memory_percent iface = gr.Interface(fn=app, inputs=None, outputs="text", live=True) iface.launch()