Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ app = FastAPI()
|
|
12 |
|
13 |
# Load the Whisper model once during startup
|
14 |
device = 0 if torch.cuda.is_available() else -1 # Use GPU if available, otherwise CPU
|
15 |
-
asr_pipeline = pipeline(model="openai/whisper-
|
16 |
# asr_pipeline = pipeline( model="openai/whisper-small", device=device, language="pt")
|
17 |
|
18 |
|
|
|
12 |
|
13 |
# Load the Whisper model once during startup
|
14 |
device = 0 if torch.cuda.is_available() else -1 # Use GPU if available, otherwise CPU
|
15 |
+
asr_pipeline = pipeline(model="openai/whisper-small", device=device) # Initialize Whisper model
|
16 |
# asr_pipeline = pipeline( model="openai/whisper-small", device=device, language="pt")
|
17 |
|
18 |
|