Spaces:
Sleeping
Sleeping
Keldos
commited on
Commit
·
c73c755
1
Parent(s):
64bc65f
WIP: chore 微调部分样式
Browse files
ChuanhuChatbot.py
CHANGED
|
@@ -175,9 +175,9 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
|
|
| 175 |
placeholder=i18n("在这里输入System Prompt..."),
|
| 176 |
label="System prompt",
|
| 177 |
value=INITIAL_SYSTEM_PROMPT,
|
| 178 |
-
lines=
|
| 179 |
)
|
| 180 |
-
with gr.Accordion(label=i18n("加载Prompt模板"), open=
|
| 181 |
with gr.Column():
|
| 182 |
with gr.Row():
|
| 183 |
with gr.Column(scale=6):
|
|
@@ -209,7 +209,7 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
|
|
| 209 |
# TODO: 公式ocr
|
| 210 |
# formula_ocr = gr.Checkbox(label=i18n("识别公式"), value=advance_docs["pdf"].get("formula_ocr", False))
|
| 211 |
|
| 212 |
-
with gr.Tab(label=i18n("
|
| 213 |
gr.Markdown(i18n("# ⚠️ 务必谨慎更改 ⚠️"), elem_id="advanced-warning")
|
| 214 |
with gr.Accordion(i18n("参数"), open=True):
|
| 215 |
temperature_slider = gr.Slider(
|
|
@@ -289,7 +289,7 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
|
|
| 289 |
value=user_name.value,
|
| 290 |
lines=1,
|
| 291 |
)
|
| 292 |
-
with gr.Tab(label=i18n("
|
| 293 |
gr.Markdown("Will be here soon...\n(We hope)\n\nAnd we hope you can help us to make more extensions!")
|
| 294 |
|
| 295 |
# changeAPIURLBtn = gr.Button(i18n("🔄 切换API地址"))
|
|
@@ -366,7 +366,7 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
|
|
| 366 |
)
|
| 367 |
|
| 368 |
with gr.Tab(label=i18n("关于"), elem_id="about-tab"):
|
| 369 |
-
gr.Markdown("
|
| 370 |
gr.Markdown("# 川虎Chat")
|
| 371 |
gr.HTML(get_html("footer.html").format(versions=versions_html()), elem_id="footer")
|
| 372 |
gr.Markdown(CHUANHU_DESCRIPTION, elem_id="description")
|
|
|
|
| 175 |
placeholder=i18n("在这里输入System Prompt..."),
|
| 176 |
label="System prompt",
|
| 177 |
value=INITIAL_SYSTEM_PROMPT,
|
| 178 |
+
lines=8
|
| 179 |
)
|
| 180 |
+
with gr.Accordion(label=i18n("加载Prompt模板"), open=False):
|
| 181 |
with gr.Column():
|
| 182 |
with gr.Row():
|
| 183 |
with gr.Column(scale=6):
|
|
|
|
| 209 |
# TODO: 公式ocr
|
| 210 |
# formula_ocr = gr.Checkbox(label=i18n("识别公式"), value=advance_docs["pdf"].get("formula_ocr", False))
|
| 211 |
|
| 212 |
+
with gr.Tab(label=i18n("参数")):
|
| 213 |
gr.Markdown(i18n("# ⚠️ 务必谨慎更改 ⚠️"), elem_id="advanced-warning")
|
| 214 |
with gr.Accordion(i18n("参数"), open=True):
|
| 215 |
temperature_slider = gr.Slider(
|
|
|
|
| 289 |
value=user_name.value,
|
| 290 |
lines=1,
|
| 291 |
)
|
| 292 |
+
with gr.Tab(label=i18n("拓展")):
|
| 293 |
gr.Markdown("Will be here soon...\n(We hope)\n\nAnd we hope you can help us to make more extensions!")
|
| 294 |
|
| 295 |
# changeAPIURLBtn = gr.Button(i18n("🔄 切换API地址"))
|
|
|
|
| 366 |
)
|
| 367 |
|
| 368 |
with gr.Tab(label=i18n("关于"), elem_id="about-tab"):
|
| 369 |
+
gr.Markdown('<img alt="Chuanhu Chat logo" src="file=web_assets/icon/any-icon-512.png" style="max-width: 144px;">')
|
| 370 |
gr.Markdown("# 川虎Chat")
|
| 371 |
gr.HTML(get_html("footer.html").format(versions=versions_html()), elem_id="footer")
|
| 372 |
gr.Markdown(CHUANHU_DESCRIPTION, elem_id="description")
|
web_assets/stylesheet/ChuanhuChat.css
CHANGED
|
@@ -15,8 +15,8 @@
|
|
| 15 |
--chatbot-blur-background-color: #F3F3F366;
|
| 16 |
--chatbot-input-background-color: rgba(255, 255, 255, 0.64);
|
| 17 |
--chatbot-input-more-background-color: #FFFFFFAA;
|
| 18 |
-
--chatbot-input-more-background-fullwidth-hover: #
|
| 19 |
-
--chatbot-input-more-background-mobilewidth-hover: #
|
| 20 |
|
| 21 |
--menu-width: 320px;
|
| 22 |
--menu-background-fill: var(--background-fill-primary);
|
|
@@ -28,7 +28,7 @@
|
|
| 28 |
--chatbot-blur-background-color: #12111166;
|
| 29 |
--chatbot-input-background-color: rgba(144, 144, 144, 0.32);
|
| 30 |
--chatbot-input-more-background-color: #3C3C3CAA;
|
| 31 |
-
--chatbot-input-more-background-fullwidth-hover: #
|
| 32 |
--chatbot-input-more-background-mobilewidth-hover: #1F1F1F44;
|
| 33 |
}
|
| 34 |
}
|
|
@@ -417,6 +417,8 @@ button.chatbot-input-more-btn:active .sm-round-bg {
|
|
| 417 |
/* 三个点号点开! */
|
| 418 |
.show-chat-more #chatbot-input-more-area {
|
| 419 |
display: flex;
|
|
|
|
|
|
|
| 420 |
}
|
| 421 |
/* no!屏幕宽度窄的时候! */
|
| 422 |
#chatbot-input-more-area {
|
|
@@ -429,9 +431,6 @@ button.chatbot-input-more-btn:active .sm-round-bg {
|
|
| 429 |
border-radius: 6px;
|
| 430 |
box-shadow: var(--shadow-sm);
|
| 431 |
background: var(--chatbot-input-more-background-color);
|
| 432 |
-
backdrop-filter: blur(24px);
|
| 433 |
-
-webkit-backdrop-filter: blur(24px);
|
| 434 |
-
|
| 435 |
}
|
| 436 |
#chatbot-input-more-area > span > div {
|
| 437 |
min-width: 120px;
|
|
@@ -860,7 +859,7 @@ input:checked + .chatbot-input-more-span {
|
|
| 860 |
#toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button {
|
| 861 |
display: inline-block;
|
| 862 |
position: relative;
|
| 863 |
-
padding: 8px
|
| 864 |
border: none;
|
| 865 |
white-space: nowrap;
|
| 866 |
width: auto;
|
|
|
|
| 15 |
--chatbot-blur-background-color: #F3F3F366;
|
| 16 |
--chatbot-input-background-color: rgba(255, 255, 255, 0.64);
|
| 17 |
--chatbot-input-more-background-color: #FFFFFFAA;
|
| 18 |
+
--chatbot-input-more-background-fullwidth-hover: #FFFFFF99;
|
| 19 |
+
--chatbot-input-more-background-mobilewidth-hover: #E6E6E644;
|
| 20 |
|
| 21 |
--menu-width: 320px;
|
| 22 |
--menu-background-fill: var(--background-fill-primary);
|
|
|
|
| 28 |
--chatbot-blur-background-color: #12111166;
|
| 29 |
--chatbot-input-background-color: rgba(144, 144, 144, 0.32);
|
| 30 |
--chatbot-input-more-background-color: #3C3C3CAA;
|
| 31 |
+
--chatbot-input-more-background-fullwidth-hover: #2F2F2F88;
|
| 32 |
--chatbot-input-more-background-mobilewidth-hover: #1F1F1F44;
|
| 33 |
}
|
| 34 |
}
|
|
|
|
| 417 |
/* 三个点号点开! */
|
| 418 |
.show-chat-more #chatbot-input-more-area {
|
| 419 |
display: flex;
|
| 420 |
+
backdrop-filter: blur(24px);
|
| 421 |
+
-webkit-backdrop-filter: blur(24px);
|
| 422 |
}
|
| 423 |
/* no!屏幕宽度窄的时候! */
|
| 424 |
#chatbot-input-more-area {
|
|
|
|
| 431 |
border-radius: 6px;
|
| 432 |
box-shadow: var(--shadow-sm);
|
| 433 |
background: var(--chatbot-input-more-background-color);
|
|
|
|
|
|
|
|
|
|
| 434 |
}
|
| 435 |
#chatbot-input-more-area > span > div {
|
| 436 |
min-width: 120px;
|
|
|
|
| 859 |
#toolbox-area > .gradio-box > .gradio-tabs > div.tab-nav > button {
|
| 860 |
display: inline-block;
|
| 861 |
position: relative;
|
| 862 |
+
padding: 8px 2rem;
|
| 863 |
border: none;
|
| 864 |
white-space: nowrap;
|
| 865 |
width: auto;
|