更新gradio版本

This commit is contained in:
William Jin 2025-10-06 10:31:14 +08:00
parent 33e1498ab7
commit 9da3cdb614
2 changed files with 5 additions and 3 deletions

View File

@ -290,7 +290,7 @@ with gr.Blocks() as iface:
list_file_button = gr.Button("刷新文件")
batch_process_button = gr.Button("批量处理")
with gr.Column():
batch_output_file = gr.File(label="批量转写结果")
batch_output_file = gr.Files(label="批量转写结果")
with gr.Row():
log_output = gr.Textbox(label="日志信息", lines=10)
@ -350,6 +350,8 @@ with gr.Blocks() as iface:
# 绑定按钮点击事件
process_button.click(batch_ocr, inputs=[input_files, user_query_text], outputs=output_file)
iface.load(fn=update_log_output, outputs=[log_output], every=1)
# 使用 Gradio 5 的定时器 API 周期性更新日志输出
timer = gr.Timer(1.0)
timer.tick(fn=update_log_output, outputs=[log_output])
iface.launch(server_name="0.0.0.0")

View File

@ -1,4 +1,4 @@
gradio==4.44.0
gradio==5.49.0
openai==1.44.1
python-dotenv~=1.0.1
pillow~=10.4.0