Update app.py
Browse files
app.py
CHANGED
@@ -193,6 +193,7 @@ def evaluate_single_data(data, client, executor, prompt_template, prompt_type):
|
|
193 |
else:
|
194 |
final_response = response_text
|
195 |
messages = update_messages_with_text(messages, response_text)
|
|
|
196 |
break
|
197 |
|
198 |
return messages
|
@@ -254,7 +255,6 @@ def o3_chat(api_key, base_url, question, image):
|
|
254 |
|
255 |
# 评估单个数据点
|
256 |
messages = evaluate_single_data(data, client, executor, prompt_template, prompt_type)
|
257 |
-
print(messages)
|
258 |
html_output = process_message(messages)
|
259 |
|
260 |
# 将消息转换为JSON字符串,用于下载
|
@@ -276,14 +276,14 @@ def create_demo():
|
|
276 |
question = gr.Textbox(label="Question", placeholder="Ask a question about the image...")
|
277 |
submit_btn = gr.Button("Submit")
|
278 |
|
279 |
-
with gr.Column(scale=1):
|
280 |
-
|
281 |
|
282 |
with gr.Row():
|
283 |
output = gr.HTML(label="Response")
|
284 |
|
285 |
-
# 添加JSON下载功能
|
286 |
-
download_btn = gr.Button("Download Messages as JSON")
|
287 |
|
288 |
# 处理提交
|
289 |
result = submit_btn.click(
|
|
|
193 |
else:
|
194 |
final_response = response_text
|
195 |
messages = update_messages_with_text(messages, response_text)
|
196 |
+
print("GPT-4.1 finish.")
|
197 |
break
|
198 |
|
199 |
return messages
|
|
|
255 |
|
256 |
# 评估单个数据点
|
257 |
messages = evaluate_single_data(data, client, executor, prompt_template, prompt_type)
|
|
|
258 |
html_output = process_message(messages)
|
259 |
|
260 |
# 将消息转换为JSON字符串,用于下载
|
|
|
276 |
question = gr.Textbox(label="Question", placeholder="Ask a question about the image...")
|
277 |
submit_btn = gr.Button("Submit")
|
278 |
|
279 |
+
# with gr.Column(scale=1):
|
280 |
+
# json_output = gr.JSON(label="Messages JSON", visible=False)
|
281 |
|
282 |
with gr.Row():
|
283 |
output = gr.HTML(label="Response")
|
284 |
|
285 |
+
# # 添加JSON下载功能
|
286 |
+
# download_btn = gr.Button("Download Messages as JSON")
|
287 |
|
288 |
# 处理提交
|
289 |
result = submit_btn.click(
|