Spaces:
Runtime error
Runtime error
Upload main.py
Browse files
main.py
CHANGED
@@ -13,7 +13,7 @@ if not AUTHENTICATION: AUTHENTICATION = None
|
|
13 |
|
14 |
from check_proxy import get_current_version
|
15 |
initial_prompt = "Serve me as a writing and programming assistant."
|
16 |
-
title_html = f"<h1 align=\"
|
17 |
description = """代码开源和更新[地址🚀](https://github.com/binary-husky/chatgpt_academic),感谢热情的[开发者们❤️](https://github.com/binary-husky/chatgpt_academic/graphs/contributors)"""
|
18 |
|
19 |
# 问询记录, python 版本建议3.9+(越新越好)
|
@@ -69,14 +69,14 @@ with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=
|
|
69 |
stopBtn = gr.Button("停止", variant="secondary"); stopBtn.style(size="sm")
|
70 |
clearBtn = gr.Button("清除", variant="secondary", visible=False); clearBtn.style(size="sm")
|
71 |
with gr.Row():
|
72 |
-
status = gr.Markdown(f"
|
73 |
-
with gr.Accordion("基础功能区", open=
|
74 |
with gr.Row():
|
75 |
for k in functional:
|
76 |
if ("Visible" in functional[k]) and (not functional[k]["Visible"]): continue
|
77 |
variant = functional[k]["Color"] if "Color" in functional[k] else "secondary"
|
78 |
functional[k]["Button"] = gr.Button(k, variant=variant)
|
79 |
-
with gr.Accordion("函数插件区", open=
|
80 |
with gr.Row():
|
81 |
gr.Markdown("注意:以下“红颜色”标识的函数插件需从输入区读取路径作为参数.")
|
82 |
with gr.Row():
|
@@ -86,7 +86,7 @@ with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=
|
|
86 |
crazy_fns[k]["Button"] = gr.Button(k, variant=variant)
|
87 |
crazy_fns[k]["Button"].style(size="sm")
|
88 |
with gr.Row():
|
89 |
-
with gr.Accordion("更多函数插件", open=
|
90 |
dropdown_fn_list = [k for k in crazy_fns.keys() if not crazy_fns[k].get("AsButton", True)]
|
91 |
with gr.Row():
|
92 |
dropdown = gr.Dropdown(dropdown_fn_list, value=r"打开插件列表", label="").style(container=False)
|
|
|
13 |
|
14 |
from check_proxy import get_current_version
|
15 |
initial_prompt = "Serve me as a writing and programming assistant."
|
16 |
+
title_html = f"<h1 align=\"left\">ChatGPT 学术优化 {get_current_version()}</h1>"
|
17 |
description = """代码开源和更新[地址🚀](https://github.com/binary-husky/chatgpt_academic),感谢热情的[开发者们❤️](https://github.com/binary-husky/chatgpt_academic/graphs/contributors)"""
|
18 |
|
19 |
# 问询记录, python 版本建议3.9+(越新越好)
|
|
|
69 |
stopBtn = gr.Button("停止", variant="secondary"); stopBtn.style(size="sm")
|
70 |
clearBtn = gr.Button("清除", variant="secondary", visible=False); clearBtn.style(size="sm")
|
71 |
with gr.Row():
|
72 |
+
status = gr.Markdown(f"Tips: 按Enter提交, 按Shift+Enter换行。当前模型: {LLM_MODEL}")
|
73 |
+
with gr.Accordion("基础功能区", open=False) as area_basic_fn:
|
74 |
with gr.Row():
|
75 |
for k in functional:
|
76 |
if ("Visible" in functional[k]) and (not functional[k]["Visible"]): continue
|
77 |
variant = functional[k]["Color"] if "Color" in functional[k] else "secondary"
|
78 |
functional[k]["Button"] = gr.Button(k, variant=variant)
|
79 |
+
with gr.Accordion("函数插件区", open=False) as area_crazy_fn:
|
80 |
with gr.Row():
|
81 |
gr.Markdown("注意:以下“红颜色”标识的函数插件需从输入区读取路径作为参数.")
|
82 |
with gr.Row():
|
|
|
86 |
crazy_fns[k]["Button"] = gr.Button(k, variant=variant)
|
87 |
crazy_fns[k]["Button"].style(size="sm")
|
88 |
with gr.Row():
|
89 |
+
with gr.Accordion("更多函数插件", open=False):
|
90 |
dropdown_fn_list = [k for k in crazy_fns.keys() if not crazy_fns[k].get("AsButton", True)]
|
91 |
with gr.Row():
|
92 |
dropdown = gr.Dropdown(dropdown_fn_list, value=r"打开插件列表", label="").style(container=False)
|