mirror of https://github.com/THUDM/ChatGLM-6B
将webui对话以聊天框的样式显示
parent
69bcdcbc4f
commit
ea28ba13bb
|
@ -0,0 +1,10 @@
|
||||||
|
.contain div div:nth-child(2n-1) div [data-testid="markdown"] p {
|
||||||
|
background: #bcffb0aa;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
[data-testid="markdown"] p {
|
||||||
|
width: fit-content;
|
||||||
|
padding: 1em;
|
||||||
|
background: #cececeaa;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
|
@ -23,7 +23,7 @@ def predict(input, max_length, top_p, temperature, history=None):
|
||||||
yield [history] + updates
|
yield [history] + updates
|
||||||
|
|
||||||
|
|
||||||
with gr.Blocks() as demo:
|
with gr.Blocks(css="html/style.css", analytics_enabled=False) as demo:
|
||||||
state = gr.State([])
|
state = gr.State([])
|
||||||
text_boxes = []
|
text_boxes = []
|
||||||
for i in range(MAX_BOXES):
|
for i in range(MAX_BOXES):
|
||||||
|
|
Loading…
Reference in New Issue