Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,8 @@ from huggingface_hub import login
|
|
5 |
import os
|
6 |
import gradio as gr
|
7 |
|
8 |
-
# Initialize ZeroGPU, which will manage device selection
|
9 |
-
zerogpu.init() # Initializes ZeroGPU
|
10 |
-
|
11 |
# Automatically choose GPU if available, otherwise CPU
|
12 |
-
device =
|
13 |
|
14 |
# Check and print if the selected device is GPU or CPU
|
15 |
if device == "cuda":
|
|
|
5 |
import os
|
6 |
import gradio as gr
|
7 |
|
|
|
|
|
|
|
8 |
# Automatically choose GPU if available, otherwise CPU
|
9 |
+
device = zerogpu.select_device() # ZeroGPU will automatically choose 'cuda' or 'cpu'
|
10 |
|
11 |
# Check and print if the selected device is GPU or CPU
|
12 |
if device == "cuda":
|