ejschwartz commited on
Commit
f78e09f
·
1 Parent(s): e63376a
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -92,7 +92,7 @@ with gr.Blocks() as demo:
92
 
93
  try:
94
  path = _resolve_uploaded_path(file)
95
- markdown_value, selected_fun = client.predict(
96
  file=handle_file(path),
97
  api_name="/file_change_fn",
98
  )
@@ -102,8 +102,8 @@ with gr.Blocks() as demo:
102
  return {
103
  intro: markdown_value,
104
  col: gr.update(visible=True),
105
- fun_dropdown: gr.update(choices=[selected_fun], value=selected_fun),
106
- state: {"file": file, "selected_fun": selected_fun},
107
  }
108
 
109
  @fun_dropdown.change(inputs=[fun_dropdown, state], outputs=[disassembly, original_decompile])
 
92
 
93
  try:
94
  path = _resolve_uploaded_path(file)
95
+ markdown_value, funs = client.predict(
96
  file=handle_file(path),
97
  api_name="/file_change_fn",
98
  )
 
102
  return {
103
  intro: markdown_value,
104
  col: gr.update(visible=True),
105
+ fun_dropdown: gr.update(choices=funs, value=None),
106
+ state: {"file": file, "selected_fun": None},
107
  }
108
 
109
  @fun_dropdown.change(inputs=[fun_dropdown, state], outputs=[disassembly, original_decompile])