fix: gpu header display
This commit is contained in:
@@ -283,6 +283,15 @@ class AudioCraftApp:
|
||||
"settings": settings,
|
||||
}
|
||||
|
||||
# Update header GPU status on page load
|
||||
def update_header_gpu():
|
||||
status = self._get_gpu_status()
|
||||
used = status.get('used_gb', 0)
|
||||
total = status.get('total_gb', 24)
|
||||
return f"GPU: {used:.1f}/{total:.1f} GB"
|
||||
|
||||
app.load(fn=update_header_gpu, outputs=[gpu_status])
|
||||
|
||||
self.app = app
|
||||
return app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user