mattjordan commited on
Commit
7938e2f
·
verified ·
1 Parent(s): dc23681

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -31,7 +31,7 @@ torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
31
  OLMOASR_REPO = "allenai/OLMoASR" # Temporary model link as requested
32
  CHECKPOINT_FILENAME = "OLMoASR-tiny.en.pt" # Adjust based on actual filename in the repo
33
  LOCAL_CHECKPOINT_DIR = "checkpoints"
34
- HF_MODEL_DIR = "checkpoints/tiny_hf_converted"
35
 
36
 
37
  def ensure_checkpoint_dir():
@@ -122,9 +122,9 @@ def convert_checkpoint_to_hf(checkpoint_path):
122
  def initialize_models():
123
  """Initialize both HuggingFace and OLMoASR models."""
124
  # Download and convert HuggingFace model
125
- checkpoint_path = download_olmoasr_checkpoint()
126
- hf_model_path = convert_checkpoint_to_hf(checkpoint_path)
127
- olmoasr_ckpt = checkpoint_path
128
 
129
  # Load HuggingFace model
130
  hf_model = AutoModelForSpeechSeq2Seq.from_pretrained(
 
31
  OLMOASR_REPO = "allenai/OLMoASR" # Temporary model link as requested
32
  CHECKPOINT_FILENAME = "OLMoASR-tiny.en.pt" # Adjust based on actual filename in the repo
33
  LOCAL_CHECKPOINT_DIR = "checkpoints"
34
+ HF_MODEL_DIR = "tiny_hf"
35
 
36
 
37
  def ensure_checkpoint_dir():
 
122
  def initialize_models():
123
  """Initialize both HuggingFace and OLMoASR models."""
124
  # Download and convert HuggingFace model
125
+ #checkpoint_path = download_olmoasr_checkpoint()
126
+ #hf_model_path = convert_checkpoint_to_hf(checkpoint_path)
127
+ olmoasr_ckpt = HF_MODEL_DIR
128
 
129
  # Load HuggingFace model
130
  hf_model = AutoModelForSpeechSeq2Seq.from_pretrained(