Spaces:
Sleeping
Sleeping
sanbo
commited on
Commit
·
6dbf541
1
Parent(s):
0dcbf45
update sth. at 2024-11-18 23:53:12
Browse files
app.py
CHANGED
@@ -125,7 +125,7 @@ def build_interface():
|
|
125 |
# 文本聊天模块
|
126 |
with gr.Tab("Llama3.2-11B"):
|
127 |
chatbox_input = gr.Textbox(label="输入你的问题", placeholder="请提问...", elem_id="chatbox_input")
|
128 |
-
chatbox_output = gr.Markdown(label="回答",
|
129 |
chatbox_button = gr.Button("发送", elem_id="chatbox_button")
|
130 |
|
131 |
def chat_handler(user_input):
|
@@ -138,7 +138,7 @@ def build_interface():
|
|
138 |
with gr.Tab("gpt4o"):
|
139 |
system_prompt_input = gr.Textbox(label="自定义系统提示词", placeholder="输入系统提示词...", elem_id="system_prompt_input")
|
140 |
chatgpt_input = gr.Textbox(label="输入你的问题", placeholder="请提问...", elem_id="chatgpt_input")
|
141 |
-
chatgpt_output = gr.Markdown(label="回答",
|
142 |
chatgpt_button = gr.Button("发送", elem_id="chatgpt_button")
|
143 |
|
144 |
def chatgpt_handler(system_prompt, user_input):
|
|
|
125 |
# 文本聊天模块
|
126 |
with gr.Tab("Llama3.2-11B"):
|
127 |
chatbox_input = gr.Textbox(label="输入你的问题", placeholder="请提问...", elem_id="chatbox_input")
|
128 |
+
chatbox_output = gr.Markdown(label="回答", elem_id="chatbox_output") # 使用 Markdown 输出
|
129 |
chatbox_button = gr.Button("发送", elem_id="chatbox_button")
|
130 |
|
131 |
def chat_handler(user_input):
|
|
|
138 |
with gr.Tab("gpt4o"):
|
139 |
system_prompt_input = gr.Textbox(label="自定义系统提示词", placeholder="输入系统提示词...", elem_id="system_prompt_input")
|
140 |
chatgpt_input = gr.Textbox(label="输入你的问题", placeholder="请提问...", elem_id="chatgpt_input")
|
141 |
+
chatgpt_output = gr.Markdown(label="回答", elem_id="chatgpt_output") # 使用 Markdown 输出
|
142 |
chatgpt_button = gr.Button("发送", elem_id="chatgpt_button")
|
143 |
|
144 |
def chatgpt_handler(system_prompt, user_input):
|