DonImages commited on
Commit
7ee03e6
·
verified ·
1 Parent(s): 3cd5f14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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 = "cuda" if torch.cuda.is_available() else "cpu"
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":