hysts HF Staff commited on
Commit
c5ddb51
·
1 Parent(s): 57b535c
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1049,16 +1049,14 @@ with gr.Blocks(title="SAM3", theme=Soft(primary_hue="blue", secondary_hue="rose"
1049
  def _sync_obj_id(s: AppState, oid):
1050
  if s is not None and oid is not None:
1051
  s.current_obj_id = int(oid)
1052
- return gr.update()
1053
 
1054
- obj_id_inp.change(fn=_sync_obj_id, inputs=[app_state, obj_id_inp], outputs=[])
1055
 
1056
  def _sync_label(s: AppState, lab: str):
1057
  if s is not None and lab is not None:
1058
  s.current_label = str(lab)
1059
- return gr.update()
1060
 
1061
- label_radio.change(fn=_sync_label, inputs=[app_state, label_radio], outputs=[])
1062
 
1063
  def _sync_prompt_type(s: AppState, val: str):
1064
  if s is not None and val is not None:
 
1049
  def _sync_obj_id(s: AppState, oid):
1050
  if s is not None and oid is not None:
1051
  s.current_obj_id = int(oid)
 
1052
 
1053
+ obj_id_inp.change(fn=_sync_obj_id, inputs=[app_state, obj_id_inp])
1054
 
1055
  def _sync_label(s: AppState, lab: str):
1056
  if s is not None and lab is not None:
1057
  s.current_label = str(lab)
 
1058
 
1059
+ label_radio.change(fn=_sync_label, inputs=[app_state, label_radio])
1060
 
1061
  def _sync_prompt_type(s: AppState, val: str):
1062
  if s is not None and val is not None: