urnotwen commited on
Commit
6bd12d9
·
verified ·
1 Parent(s): 645fd65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -61,12 +61,12 @@ def process_image(input_image):
61
  # For React Frontend (JSON)
62
  def get_system_stats_api():
63
  return {
64
- "cpu": psutil.cpu_percent(interval=None),
65
  "ram": psutil.virtual_memory().percent
66
  }
67
  # For Gradio UI (Visual Markdown)
68
  def get_system_stats_ui():
69
- cpu = psutil.cpu_percent(interval=None)
70
  ram = psutil.virtual_memory().percent
71
  return f"""
72
  ## 🖥️ System Status
@@ -78,7 +78,7 @@ def get_system_stats_ui():
78
 
79
  # --- 4. 介面 ---
80
  with gr.Blocks(title="去背服務測試") as app:
81
- gr.Markdown("## ✂️ 去背服務測試")
82
 
83
  with gr.Tabs():
84
  # Tab 1: Image Processing
 
61
  # For React Frontend (JSON)
62
  def get_system_stats_api():
63
  return {
64
+ "cpu": psutil.cpu_percent(interval=1),
65
  "ram": psutil.virtual_memory().percent
66
  }
67
  # For Gradio UI (Visual Markdown)
68
  def get_system_stats_ui():
69
+ cpu = psutil.cpu_percent(interval=1)
70
  ram = psutil.virtual_memory().percent
71
  return f"""
72
  ## 🖥️ System Status
 
78
 
79
  # --- 4. 介面 ---
80
  with gr.Blocks(title="去背服務測試") as app:
81
+ gr.Markdown("## ✂️ 去背服務測試RM2")
82
 
83
  with gr.Tabs():
84
  # Tab 1: Image Processing