From ee2d0e8e18aa40fa6b4f45f97667201b1fee2f96 Mon Sep 17 00:00:00 2001 From: Yicheng Qian Date: Tue, 12 Nov 2024 11:19:01 -0800 Subject: [PATCH] add decode utf-9 logic in terminal output --- nexa/gguf/nexa_inference_audio_lm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nexa/gguf/nexa_inference_audio_lm.py b/nexa/gguf/nexa_inference_audio_lm.py index 5594c684..05972ed9 100644 --- a/nexa/gguf/nexa_inference_audio_lm.py +++ b/nexa/gguf/nexa_inference_audio_lm.py @@ -153,7 +153,8 @@ def run(self): user_input = nexa_prompt("Enter text (leave empty if no prompt): ") with suppress_stdout_stderr(): response = self.inference(audio_path, user_input) - print(response) + response = response.decode("utf-8") if isinstance(response, bytes) else response + print(f"{response}") except KeyboardInterrupt: print("\nExiting...")