fix render html code

This commit is contained in:
2025-03-26 00:02:01 +07:00
parent 4a5da6ed79
commit 55544a8746
2 changed files with 5 additions and 2 deletions

View File

@@ -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"<iframe srcdoc='{html}' width='100%' height='1000'></iframe>"
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):