Spaces:
Running
Running
Enoch
commited on
Commit
·
db4e98a
1
Parent(s):
d359722
修改了点击按钮的事件
Browse files
app.py
CHANGED
@@ -507,10 +507,13 @@ with gr.Blocks(theme=gr.themes.Soft(
|
|
507 |
outputs=[download_file]
|
508 |
)
|
509 |
|
510 |
-
# 修改生成按钮的点击事件,添加模型选择参数
|
511 |
generate_button.click(
|
512 |
-
fn=
|
513 |
-
inputs=[
|
|
|
|
|
|
|
|
|
514 |
outputs=[status_box, final_output]
|
515 |
).then(
|
516 |
fn=lambda x: gr.update(visible=True),
|
|
|
507 |
outputs=[download_file]
|
508 |
)
|
509 |
|
|
|
510 |
generate_button.click(
|
511 |
+
fn=increment_user_counter, # 第一步:立刻发送点击事件的日志
|
512 |
+
inputs=[],
|
513 |
+
outputs=[] # 把返回的字符串显示在“生成状态”文本框中
|
514 |
+
).then(
|
515 |
+
fn=generate_patent_document, # 第二步:再去真正生成文档
|
516 |
+
inputs=[bg, sh, pr, so, kp, adv, alt, model_dropdown],
|
517 |
outputs=[status_box, final_output]
|
518 |
).then(
|
519 |
fn=lambda x: gr.update(visible=True),
|