From 771f074c0e6f5a51394ec4aa5cd01c311f25207d Mon Sep 17 00:00:00 2001 From: trducng Date: Mon, 5 Feb 2024 16:42:40 +0700 Subject: [PATCH] Add utf-8 encoding in Help Page for rendering on Windows --- libs/ktem/ktem/pages/help.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ktem/ktem/pages/help.py b/libs/ktem/ktem/pages/help.py index c1dccf3..b1c243b 100644 --- a/libs/ktem/ktem/pages/help.py +++ b/libs/ktem/ktem/pages/help.py @@ -12,13 +12,13 @@ class HelpPage: gr.Markdown(self.get_changelogs()) with gr.Accordion("About Kotaemon (temporary)"): - with (self.dir_md / "about_kotaemon.md").open() as fi: + with (self.dir_md / "about_kotaemon.md").open(encoding="utf-8") as fi: gr.Markdown(fi.read()) with gr.Accordion("About Cinnamon AI (temporary)", open=False): - with (self.dir_md / "about_cinnamon.md").open() as fi: + with (self.dir_md / "about_cinnamon.md").open(encoding="utf-8") as fi: gr.Markdown(fi.read()) def get_changelogs(self): - with (self.dir_md / "changelogs.md").open() as fi: + with (self.dir_md / "changelogs.md").open(encoding="utf-8") as fi: return fi.read()