From 55544a8746623a4447a82813200185054a283101 Mon Sep 17 00:00:00 2001 From: DrHo1y Date: Wed, 26 Mar 2025 00:02:01 +0700 Subject: [PATCH] fix render html code --- app/model_configs.py | 2 +- app/rkllm_server_gradio.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/model_configs.py b/app/model_configs.py index a16c2bb..9447df0 100644 --- a/app/model_configs.py +++ b/app/model_configs.py @@ -39,7 +39,7 @@ model_configs = { """ }, "models": { - "Qwen2.5-Coder-3B-Instruct-w8w8": {"filename": "Qwen2.5-Coder-3B-Instruct-w8w8.rkllm"} + "Qwen2.5-Coder-3B-Instruct-w8w8-For-clear-code": {"filename": "Qwen2.5-Coder-3B-Instruct-w8w8.rkllm"} } }, "Qwen2.5-Coder-3B-Instruct-w8w8": { diff --git a/app/rkllm_server_gradio.py b/app/rkllm_server_gradio.py index bc7eadd..5dabaca 100644 --- a/app/rkllm_server_gradio.py +++ b/app/rkllm_server_gradio.py @@ -66,13 +66,16 @@ if __name__ == "__main__": # Компонент для отображения HTML-ответа output_html = gr.HTML(label="Ответ LLM") def process_txt2txt(input_text): - return input_text + html = input_text.replace("\t", "").replace("\n", "") + result = f"" + return result submit_button.click( process_txt2txt, inputs=input_text, outputs=output_html ) + # with gr.TabItem("Txt2Mesh"): # with gr.Row(): # with gr.Column(scale=2):