youngtsai commited on
Commit
cc390c1
1 Parent(s): b052980

clear_button.click(lambda: ["","",""], None, [chat_output, json_file, json_textbox], queue=False)

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -142,7 +142,7 @@ if __name__ == "__main__":
142
  role2_gender = gr.Dropdown(choices=["male", "female"], label="角色 2 性別")
143
 
144
  # 在这里添加提交和清除按鈕
145
- submit_button = gr.Button("Submit", type="submit")
146
  clear_button = gr.Button("Clear")
147
  submit_button.click(
148
  main_function,
@@ -163,7 +163,7 @@ if __name__ == "__main__":
163
  json_textbox
164
  ]
165
  )
166
- clear_button.click(lambda: None, None, [chat_output, json_file, json_textbox], queue=False)
167
 
168
 
169
 
 
142
  role2_gender = gr.Dropdown(choices=["male", "female"], label="角色 2 性別")
143
 
144
  # 在这里添加提交和清除按鈕
145
+ submit_button = gr.Button("Submit")
146
  clear_button = gr.Button("Clear")
147
  submit_button.click(
148
  main_function,
 
163
  json_textbox
164
  ]
165
  )
166
+ clear_button.click(lambda: ["","",""], None, [chat_output, json_file, json_textbox], queue=False)
167
 
168
 
169