This commit is contained in:
parent
7bdc80cd1e
commit
44c3814d13
14
meta_ui.py
14
meta_ui.py
|
|
@ -129,23 +129,15 @@ with gr.Blocks(title="调试界面") as demo:
|
|||
log_box = gr.Textbox(label="实时日志", lines=20, interactive=False, visible=False) # ✅ 默认隐藏
|
||||
|
||||
# Chat 界面(移到日志之前)
|
||||
# chatbot = gr.ChatInterface(
|
||||
# fn=chat,
|
||||
# additional_inputs=[max_new, temp, top_p, top_k,
|
||||
# rep_pen, pres_pen, stop_txt, log_state],
|
||||
# additional_outputs=[log_state],
|
||||
# type="messages"
|
||||
# )
|
||||
|
||||
chatbot = gr.ChatInterface(
|
||||
fn=chat,
|
||||
textbox=gr.Textbox(lines=2, placeholder="文本...", label="Prompt"),
|
||||
submit_btn=gr.Button(value="", icon="send"),
|
||||
additional_inputs=[max_new, temp, top_p, top_k, rep_pen, pres_pen, stop_txt, log_state],
|
||||
additional_inputs=[max_new, temp, top_p, top_k,
|
||||
rep_pen, pres_pen, stop_txt, log_state],
|
||||
additional_outputs=[log_state],
|
||||
type="messages"
|
||||
)
|
||||
|
||||
|
||||
# 日志刷新定时器
|
||||
timer = gr.Timer(1.0, render=True)
|
||||
timer.tick(
|
||||
|
|
|
|||
Loading…
Reference in New Issue