Spaces:
Build error
Build error
Hyperparam tuning.
Browse files
app.py
CHANGED
@@ -90,8 +90,9 @@ def evaluate_stream(msg, history, temperature, top_p):
|
|
90 |
|
91 |
import gradio as gr
|
92 |
|
93 |
-
title = """<h1 align="center"
|
94 |
-
<h3 align="center">这是一个通过ChatGLM模型训练的李萌萌的数字分身,你可以与她聊天,或者直接在文本框按下Enter,来观察李萌萌到底会说些什么。</h3>
|
|
|
95 |
|
96 |
footer = """<p align='center'>项目在<a href='https://github.com/ljsabc/Fujisaki' target='_blank'>GitHub</a>上托管,基于清华的<a href='https://huggingface.co/THUDM/chatglm-6b' target='_blank'>THUDM/chatglm-6b</a>项目。</p>
|
97 |
<p align='center'><em>"I'm... a boy." --Chihiro Fujisaki</em></p>"""
|
@@ -101,9 +102,9 @@ with gr.Blocks() as demo:
|
|
101 |
state = gr.State()
|
102 |
with gr.Row():
|
103 |
with gr.Column(scale=2):
|
104 |
-
temp = gr.components.Slider(minimum=0, maximum=1.1, value=0.
|
105 |
info="温度参数,越高的温度生成的内容越丰富,但是有可能出现语法问题。小的温度也能帮助生成更相关的回答。")
|
106 |
-
top_p = gr.components.Slider(minimum=0.5, maximum=1.0, value=0.
|
107 |
info="top-p参数,只输出前p>top-p的文字,越大生成的内容越丰富,但也可能出现语法问题。数字越小似乎上下文的衔接性越好。")
|
108 |
#code = gr.Textbox(label="temp_output", info="解码器输出")
|
109 |
#top_k = gr.components.Slider(minimum=1, maximum=200, step=1, value=25, label="Top k",
|
|
|
90 |
|
91 |
import gradio as gr
|
92 |
|
93 |
+
title = """<h1 align="center">李萌萌(长期供养版)</h1>
|
94 |
+
<h3 align="center">这是一个通过ChatGLM模型训练的李萌萌的数字分身,你可以与她聊天,或者直接在文本框按下Enter,来观察李萌萌到底会说些什么。</h3>
|
95 |
+
<p align="center">因为经过了int4量化,所以可以在很低内存的设备上跑起来,这样大概就真的成盒了(确信)。</p>"""
|
96 |
|
97 |
footer = """<p align='center'>项目在<a href='https://github.com/ljsabc/Fujisaki' target='_blank'>GitHub</a>上托管,基于清华的<a href='https://huggingface.co/THUDM/chatglm-6b' target='_blank'>THUDM/chatglm-6b</a>项目。</p>
|
98 |
<p align='center'><em>"I'm... a boy." --Chihiro Fujisaki</em></p>"""
|
|
|
102 |
state = gr.State()
|
103 |
with gr.Row():
|
104 |
with gr.Column(scale=2):
|
105 |
+
temp = gr.components.Slider(minimum=0, maximum=1.1, value=0.5, label="Temperature",
|
106 |
info="温度参数,越高的温度生成的内容越丰富,但是有可能出现语法问题。小的温度也能帮助生成更相关的回答。")
|
107 |
+
top_p = gr.components.Slider(minimum=0.5, maximum=1.0, value=0.95, label="Top-p",
|
108 |
info="top-p参数,只输出前p>top-p的文字,越大生成的内容越丰富,但也可能出现语法问题。数字越小似乎上下文的衔接性越好。")
|
109 |
#code = gr.Textbox(label="temp_output", info="解码器输出")
|
110 |
#top_k = gr.components.Slider(minimum=1, maximum=200, step=1, value=25, label="Top k",
|