Darayut commited on
Commit
ba3172d
·
verified ·
1 Parent(s): e2525c9

inference.py: put the bundled omniprune package on sys.path

Browse files
Files changed (1) hide show
  1. inference.py +2 -0
inference.py CHANGED
@@ -7,6 +7,7 @@ from __future__ import annotations
7
 
8
  import argparse
9
  import json
 
10
  from pathlib import Path
11
 
12
  import soundfile as sf
@@ -14,6 +15,7 @@ import torch
14
  import torchaudio.functional as AF
15
  from safetensors.torch import load_file
16
 
 
17
  from omniprune.model import ArchConfig, PrunableCTC, normalize_audio_
18
  from omniprune.text import CharVocab
19
 
 
7
 
8
  import argparse
9
  import json
10
+ import sys
11
  from pathlib import Path
12
 
13
  import soundfile as sf
 
15
  import torchaudio.functional as AF
16
  from safetensors.torch import load_file
17
 
18
+ sys.path.insert(0, str(Path(__file__).resolve().parent)) # the bundled omniprune package
19
  from omniprune.model import ArchConfig, PrunableCTC, normalize_audio_
20
  from omniprune.text import CharVocab
21