Skip to content

Commit

Permalink
🌠 Apply reformatter
Browse files Browse the repository at this point in the history
  • Loading branch information
kadirnar committed May 2, 2024
1 parent cea1508 commit f94634c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions whisperplus/pipelines/whisper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline, BitsAndBytesConfig
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, BitsAndBytesConfig, pipeline

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Expand All @@ -26,7 +26,7 @@ def load_model(self, model_id: str = "openai/whisper-large-v3"):
model_id (str): Identifier of the pre-trained model to be loaded.
"""
logging.info("Loading model...")

bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
Expand All @@ -40,7 +40,7 @@ def load_model(self, model_id: str = "openai/whisper-large-v3"):
use_safetensors=True,
attn_implementation="flash_attention_2",
device_map="auto")

logging.info("Model loaded successfully.")

processor = AutoProcessor.from_pretrained(model_id)
Expand Down

0 comments on commit f94634c

Please sign in to comment.