Update app.py
Browse files
app.py
CHANGED
@@ -142,9 +142,8 @@ video_interface = gr.Interface(
|
|
142 |
title="π₯ FloVD: Optical Flow + CogVideoX Video Generation",
|
143 |
description="Upload an image and prompt to generate motion-controlled video using FloVD and CogVideoX."
|
144 |
)
|
145 |
-
|
146 |
# =========================================
|
147 |
-
# 4. Live System Monitor
|
148 |
# =========================================
|
149 |
|
150 |
def get_system_stats():
|
@@ -170,7 +169,12 @@ def get_system_stats():
|
|
170 |
with gr.Blocks() as monitor_tab:
|
171 |
gr.Markdown("## π Live System Resource Monitor")
|
172 |
stats_box = gr.Textbox(label="Live Stats", lines=10, interactive=False)
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
# =========================================
|
176 |
# 5. Combine Tabs: FloVD + Monitor
|
|
|
142 |
title="π₯ FloVD: Optical Flow + CogVideoX Video Generation",
|
143 |
description="Upload an image and prompt to generate motion-controlled video using FloVD and CogVideoX."
|
144 |
)
|
|
|
145 |
# =========================================
|
146 |
+
# 4. Live System Monitor (Fixed)
|
147 |
# =========================================
|
148 |
|
149 |
def get_system_stats():
|
|
|
169 |
with gr.Blocks() as monitor_tab:
|
170 |
gr.Markdown("## π Live System Resource Monitor")
|
171 |
stats_box = gr.Textbox(label="Live Stats", lines=10, interactive=False)
|
172 |
+
|
173 |
+
def update_stats():
|
174 |
+
return gr.update(value=get_system_stats())
|
175 |
+
|
176 |
+
stats_btn = gr.Button("π Refresh Stats")
|
177 |
+
stats_btn.click(fn=update_stats, outputs=stats_box)
|
178 |
|
179 |
# =========================================
|
180 |
# 5. Combine Tabs: FloVD + Monitor
|