Skip to content

Commit

Permalink
update model catalog functions
Browse files Browse the repository at this point in the history
  • Loading branch information
DARREN OBERST authored and DARREN OBERST committed Dec 19, 2024
1 parent 87c6316 commit 92ea96b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions llmware/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3943,6 +3943,14 @@ def __init__(self, model=None, tokenizer=None, model_name=None, api_key=None, mo

self.get_token_counts = OVConfig().get_config("get_token_counts")

# check for llmware path & create if not already set up
if not os.path.exists(LLMWareConfig.get_llmware_path()):
# if not explicitly set up by user, then create folder directory structure
LLMWareConfig.setup_llmware_workspace()

if not os.path.exists(LLMWareConfig.get_model_repo_path()):
os.mkdir(LLMWareConfig.get_model_repo_path())

# please note that the external tokenizer is used solely for producing
# input and output token counts - and can be switched off in OVConfig
if self.get_token_counts:
Expand Down Expand Up @@ -10439,8 +10447,6 @@ def _generate(self, data):

""" Executes lib_whisper generation on data from audio file. """

print("self.context len - ",self.context)

w = self._lib.whisper_full(ctypes.c_void_p(self.context),
self.params,
data.ctypes.data_as(ctypes.POINTER(ctypes.c_float)),
Expand Down

0 comments on commit 92ea96b

Please sign in to comment.