Skip to content

Commit

Permalink
fix theme folder rename problem
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Jul 16, 2023
1 parent b308fde commit fe231f7
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crazy_functions/对话历史存档.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'<!DOCTYPE html><head><meta charset="utf-8"><title>对话历史</title><style>{advanced_css}</style></head>')
for i, contents in enumerate(chatbot):
for j, content in enumerate(contents):
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<h1 align=\"center\">GPT 学术优化 {get_current_version()}</h1>{theme_declaration}"
description = """代码开源和更新[地址🚀](https://github.com/binary-husky/chatgpt_academic),感谢热情的[开发者们❤️](https://github.com/binary-husky/chatgpt_academic/graphs/contributors)"""
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions theme/default.py → themes/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<script>{f.read()}</script>"

# 添加一个萌萌的看板娘
Expand All @@ -82,5 +82,5 @@ def gradio_new_template_fn(*args, **kwargs):
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()
File renamed without changes.
4 changes: 2 additions & 2 deletions theme/green.py → themes/green.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<script>{f.read()}</script>"

# 添加一个萌萌的看板娘
Expand All @@ -100,5 +100,5 @@ def gradio_new_template_fn(*args, **kwargs):
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()
File renamed without changes.
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -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图片生成插件"
}

0 comments on commit fe231f7

Please sign in to comment.