diff --git a/crazy_functions/对话历史存档.py b/crazy_functions/对话历史存档.py index 003cbf5d..a0d0ac8e 100644 --- a/crazy_functions/对话历史存档.py +++ b/crazy_functions/对话历史存档.py @@ -12,7 +12,7 @@ def write_chat_to_file(chatbot, history=None, file_name=None): file_name = 'chatGPT对话历史' + time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + '.html' os.makedirs('./gpt_log/', exist_ok=True) with open(f'./gpt_log/{file_name}', 'w', encoding='utf8') as f: - from theme.theme import advanced_css + from themes.theme import advanced_css f.write(f'对话历史') for i, contents in enumerate(chatbot): for j, content in enumerate(contents): diff --git a/main.py b/main.py index a39736dc..f5bb9af6 100644 --- a/main.py +++ b/main.py @@ -14,7 +14,7 @@ def main(): if not AUTHENTICATION: AUTHENTICATION = None from check_proxy import get_current_version - from theme.theme import adjust_theme, advanced_css, theme_declaration + from themes.theme import adjust_theme, advanced_css, theme_declaration initial_prompt = "Serve me as a writing and programming assistant." title_html = f"

GPT 学术优化 {get_current_version()}

{theme_declaration}" description = """代码开源和更新[地址🚀](https://github.com/binary-husky/chatgpt_academic),感谢热情的[开发者们❤️](https://github.com/binary-husky/chatgpt_academic/graphs/contributors)""" diff --git a/theme/common.js b/themes/common.js similarity index 100% rename from theme/common.js rename to themes/common.js diff --git a/theme/default.css b/themes/default.css similarity index 100% rename from theme/default.css rename to themes/default.css diff --git a/theme/default.py b/themes/default.py similarity index 97% rename from theme/default.py rename to themes/default.py index 21931f77..4efde5bd 100644 --- a/theme/default.py +++ b/themes/default.py @@ -60,7 +60,7 @@ def adjust_theme(): if LAYOUT=="TOP-DOWN": js = "" else: - with open('theme/common.js', 'r', encoding='utf8') as f: + with open('themes/common.js', 'r', encoding='utf8') as f: js = f"" # 添加一个萌萌的看板娘 @@ -82,5 +82,5 @@ def adjust_theme(): print('gradio版本较旧, 不能自定义字体和颜色') return set_theme -with open("theme/default.css", "r", encoding="utf-8") as f: +with open("themes/default.css", "r", encoding="utf-8") as f: advanced_css = f.read() \ No newline at end of file diff --git a/theme/green.css b/themes/green.css similarity index 100% rename from theme/green.css rename to themes/green.css diff --git a/theme/green.py b/themes/green.py similarity index 96% rename from theme/green.py rename to themes/green.py index 98ac7767..4a906f24 100644 --- a/theme/green.py +++ b/themes/green.py @@ -77,7 +77,7 @@ def adjust_theme(): if LAYOUT=="TOP-DOWN": js = "" else: - with open('theme/common.js', 'r', encoding='utf8') as f: + with open('themes/common.js', 'r', encoding='utf8') as f: js = f"" # 添加一个萌萌的看板娘 @@ -100,5 +100,5 @@ def adjust_theme(): return set_theme -with open("theme/green.css", "r", encoding="utf-8") as f: +with open("themes/green.css", "r", encoding="utf-8") as f: advanced_css = f.read() diff --git a/theme/theme.py b/themes/theme.py similarity index 100% rename from theme/theme.py rename to themes/theme.py diff --git a/version b/version index eb06093d..753e407b 100644 --- a/version +++ b/version @@ -1,5 +1,5 @@ { "version": 3.46, "show_feature": true, - "new_feature": "新增实时语音对话插件(自动断句,脱手对话) <-> 支持加载自定义的ChatGLM2微调模型 <-> 动态ChatBot窗口高度 <-> 修复Azure接口的BUG <-> 完善多语言模块 <-> 完善本地Latex矫错和翻译功能 <-> 增加gpt-3.5-16k的支持 <-> 新增最强Arxiv论文翻译插件 <-> 修复gradio复制按钮BUG <-> 修复PDF翻译的BUG, 新增HTML中英双栏对照 <-> 添加了OpenAI图片生成插件" + "new_feature": "临时修复theme的文件丢失问题 <-> 新增实时语音对话插件(自动断句,脱手对话) <-> 支持加载自定义的ChatGLM2微调模型 <-> 动态ChatBot窗口高度 <-> 修复Azure接口的BUG <-> 完善多语言模块 <-> 完善本地Latex矫错和翻译功能 <-> 增加gpt-3.5-16k的支持 <-> 新增最强Arxiv论文翻译插件 <-> 修复gradio复制按钮BUG <-> 修复PDF翻译的BUG, 新增HTML中英双栏对照 <-> 添加了OpenAI图片生成插件" } \ No newline at end of file