Spaces:
Paused
Paused
aeb56
commited on
Commit
·
e62c736
1
Parent(s):
5e458c4
Fix variable scope error causing Internal Server Error
Browse files
app.py
CHANGED
|
@@ -173,7 +173,9 @@ with gr.Blocks(theme=gr.themes.Soft(), title="Kimi 48B Fine-tuned - Inference")
|
|
| 173 |
|
| 174 |
# GPU Info
|
| 175 |
if torch.cuda.is_available():
|
| 176 |
-
|
|
|
|
|
|
|
| 177 |
else:
|
| 178 |
gpu_info = "### ⚠️ Running on CPU (no GPU detected)"
|
| 179 |
gr.Markdown(gpu_info)
|
|
|
|
| 173 |
|
| 174 |
# GPU Info
|
| 175 |
if torch.cuda.is_available():
|
| 176 |
+
num_gpus = torch.cuda.device_count()
|
| 177 |
+
total_vram_ui = sum(torch.cuda.get_device_properties(i).total_memory / 1024**3 for i in range(num_gpus))
|
| 178 |
+
gpu_info = f"### 🎮 Hardware: {num_gpus}x {torch.cuda.get_device_name(0)} ({total_vram_ui:.1f}GB total VRAM)"
|
| 179 |
else:
|
| 180 |
gpu_info = "### ⚠️ Running on CPU (no GPU detected)"
|
| 181 |
gr.Markdown(gpu_info)
|