ejschwartz commited on
Commit
4fecb04
·
1 Parent(s): 45c2bcc

extra_args

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -53,6 +53,8 @@ with gr.Blocks() as demo:
53
  """
54
  )
55
 
 
 
56
  with gr.Row(visible=True):
57
  disassembly = gr.Code(
58
  label="Disassembly",
@@ -98,8 +100,9 @@ with gr.Blocks() as demo:
98
  fun_dropdown: gr.update(**funs),
99
  }
100
 
101
- @fun_dropdown.change(inputs=fun_dropdown, outputs=[disassembly, original_decompile])
102
- def function_change_fn(selected_fun):
 
103
 
104
  if selected_fun is None:
105
  return {
@@ -110,6 +113,7 @@ with gr.Blocks() as demo:
110
  try:
111
  disassembly_str, decompile_str = client.predict(
112
  selected_fun=selected_fun,
 
113
  api_name="/function_change_fn",
114
  )
115
  except Exception as e:
 
53
  """
54
  )
55
 
56
+ extra_args = gr.Textbox(label="Extra args to export.bash", placeholder="emit_type_definitions false", value="")
57
+
58
  with gr.Row(visible=True):
59
  disassembly = gr.Code(
60
  label="Disassembly",
 
100
  fun_dropdown: gr.update(**funs),
101
  }
102
 
103
+ @fun_dropdown.change(inputs=[fun_dropdown, extra_args], outputs=[disassembly, original_decompile])
104
+ @extra_args.submit(inputs=[fun_dropdown, extra_args], outputs=[disassembly, original_decompile])
105
+ def function_change_fn(selected_fun, extra_args):
106
 
107
  if selected_fun is None:
108
  return {
 
113
  try:
114
  disassembly_str, decompile_str = client.predict(
115
  selected_fun=selected_fun,
116
+ extra_args=extra_args,
117
  api_name="/function_change_fn",
118
  )
119
  except Exception as e: