From 92ea96b89d8dc2415d2e0170931661ea0065326a Mon Sep 17 00:00:00 2001 From: DARREN OBERST Date: Thu, 19 Dec 2024 12:18:38 -0500 Subject: [PATCH] update model catalog functions --- llmware/models.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/llmware/models.py b/llmware/models.py index fe6714f5..1a97b180 100755 --- a/llmware/models.py +++ b/llmware/models.py @@ -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: @@ -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)),