legusxyz commited on
Commit
6d35bfe
·
verified ·
1 Parent(s): 20e96b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ import time
9
  app = FastAPI()
10
 
11
  # Load the Whisper model once during startup
12
- device = 0 if torch.cuda.is_available() else -1 # Use GPU if available, otherwise CPU
 
13
  asr_pipeline = pipeline(model="openai/whisper-small", device=device) # Initialize Whisper model
14
 
15
  # Basic GET endpoint
 
9
  app = FastAPI()
10
 
11
  # Load the Whisper model once during startup
12
+ # device = 0 if torch.cuda.is_available() else -1 # Use GPU if available, otherwise CPU
13
+ device = -1
14
  asr_pipeline = pipeline(model="openai/whisper-small", device=device) # Initialize Whisper model
15
 
16
  # Basic GET endpoint