Commit
•
3c6249e
1
Parent(s):
4be4da9
Fix GPU percentage
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def get_gpu_usage():
|
|
113 |
except subprocess.CalledProcessError:
|
114 |
return "Unavailable"
|
115 |
gpu_use_values = [int(x.split()[0]) for i, x in enumerate(gpu_use_info)]
|
116 |
-
return gpu_use_values[0] if len(gpu_use_values) > 0 else "Unavailable"
|
117 |
|
118 |
|
119 |
def get_usage():
|
|
|
113 |
except subprocess.CalledProcessError:
|
114 |
return "Unavailable"
|
115 |
gpu_use_values = [int(x.split()[0]) for i, x in enumerate(gpu_use_info)]
|
116 |
+
return f"{gpu_use_values[0]} %" if len(gpu_use_values) > 0 else "Unavailable"
|
117 |
|
118 |
|
119 |
def get_usage():
|