Merge pull request #209 from jr-shen/dev-1

(1)修改语法检查的prompt,确保输出格式统一。

之前使用时经常发现输出没有把修改的部分加粗,或者在表格中把整段文字输出了,影响阅读。因此在之前的prompt基础上增加了一个example,确保输出格式统一。

(2)表格内增加了边框线,使行/列之间的分隔更清楚。

使用时发现没有边框的表格在里面文字较多时难以区分。因此增加表格内边框线。
This commit is contained in:
binary-husky
2023-04-01 03:37:02 +08:00
committed by GitHub
3 changed files with 30 additions and 9 deletions

14
main.py
View File

@@ -36,8 +36,20 @@ gr.Chatbot.postprocess = format_io
from theme import adjust_theme
set_theme = adjust_theme()
CSS = """
.markdown-body table {
border: 1px solid #ddd;
border-collapse: collapse;
}
.markdown-body th, .markdown-body td {
border: 1px solid #ddd;
padding: 5px;
}
"""
cancel_handles = []
with gr.Blocks(theme=set_theme, analytics_enabled=False) as demo:
with gr.Blocks(theme=set_theme, analytics_enabled=False, css=CSS) as demo:
gr.HTML(title_html)
with gr.Row().style(equal_height=True):
with gr.Column(scale=2):