From c8e922fee872f509ef94c2acd41405de8b143272 Mon Sep 17 00:00:00 2001 From: Yicheng Qian Date: Fri, 22 Nov 2024 11:32:16 -0800 Subject: [PATCH] handle lowercase to uppercase --- nexa/gguf/nexa_inference_vlm_omni.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nexa/gguf/nexa_inference_vlm_omni.py b/nexa/gguf/nexa_inference_vlm_omni.py index 021f79e7..80a60bb2 100644 --- a/nexa/gguf/nexa_inference_vlm_omni.py +++ b/nexa/gguf/nexa_inference_vlm_omni.py @@ -149,6 +149,9 @@ def run(self): def inference(self, prompt: str, image_path: str): with suppress_stdout_stderr(): + if prompt and prompt[0].islower(): + prompt = prompt[0].upper() + prompt[1:] + prompt = ctypes.c_char_p(prompt.encode("utf-8")) image_path = ctypes.c_char_p(image_path.encode("utf-8")) response = omni_vlm_cpp.omnivlm_inference(prompt, image_path)