Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ device = 0 if torch.cuda.is_available() else "cpu"
|
|
25 |
bnb_config = BitsAndBytesConfig(load_in_4bit=True)
|
26 |
|
27 |
# Load the model
|
28 |
-
model = WhisperForConditionalGeneration.from_pretrained(
|
29 |
|
30 |
# bnb_config = bnb.QuantizationConfig(bits=4)
|
31 |
pipe = pipeline(task="automatic-speech-recognition", model=model, chunk_length_s=30, device=device)
|
|
|
25 |
bnb_config = BitsAndBytesConfig(load_in_4bit=True)
|
26 |
|
27 |
# Load the model
|
28 |
+
model = WhisperForConditionalGeneration.from_pretrained(MODEL_NAME, config=bnb_config)
|
29 |
|
30 |
# bnb_config = bnb.QuantizationConfig(bits=4)
|
31 |
pipe = pipeline(task="automatic-speech-recognition", model=model, chunk_length_s=30, device=device)
|