Skip to content

Commit

Permalink
Improved module import
Browse files Browse the repository at this point in the history
  • Loading branch information
chenguoguo committed Dec 31, 2020
1 parent cad009f commit 7e4b186
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/Python/snowboy_model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
COMPTYPE = 'NONE'
COMPNAME = 'not compressed'

RES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'resources/model_generator')
RES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'resources/pmdl')

DEFAULT_LANG = 'en'
VAD_RESOURCE = os.path.join(RES_DIR, DEFAULT_LANG, 'personal_enroll.res')
Expand Down
Empty file added lib/osx/__init__.py
Empty file.
6 changes: 4 additions & 2 deletions lib/snowboy_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import platform

if platform.system() == "Darwin":
from osx.snowboy import *
from osx.pmdl.snowboy import *
elif platform.linux_distribution()[0] == "Ubuntu" and platform.linux_distribution()[1] == "16.04":
from ubuntu64.pmdl.snowboy import *
else:
from ubuntu64.snowboy import *
raise ImportError("pmdl generator only runs on OSX or Ubuntu 16.04.")
Empty file added lib/ubuntu64/__init__.py
Empty file.

0 comments on commit 7e4b186

Please sign in to comment.