Spaces:
Runtime error
Runtime error
Edward J. Schwartz
commited on
Commit
·
b7caf2a
1
Parent(s):
58caa69
Interface
Browse files
app.py
CHANGED
|
@@ -122,7 +122,8 @@ with gr.Blocks() as demo:
|
|
| 122 |
top_k = {e['label']: e['confidence'] for e in load_results['confidences']}
|
| 123 |
|
| 124 |
return {disassembly: gr.Textbox.update(value=disassembly_str),
|
| 125 |
-
clazz: gr.Label.update(top_k)
|
|
|
|
| 126 |
}
|
| 127 |
|
| 128 |
# XXX: Ideally we'd use the gr.load model, which uses the huggingface
|
|
@@ -146,7 +147,7 @@ with gr.Blocks() as demo:
|
|
| 146 |
|
| 147 |
file_widget.change(file_change_fn, file_widget, [col, fun_dropdown, all_dis_state])
|
| 148 |
|
| 149 |
-
fun_dropdown.change(function_change_fn, [fun_dropdown, all_dis_state], [disassembly, clazz])
|
| 150 |
|
| 151 |
interpret_button.click(interpretation_function, disassembly, interpretation)
|
| 152 |
|
|
|
|
| 122 |
top_k = {e['label']: e['confidence'] for e in load_results['confidences']}
|
| 123 |
|
| 124 |
return {disassembly: gr.Textbox.update(value=disassembly_str),
|
| 125 |
+
clazz: gr.Label.update(top_k),
|
| 126 |
+
interpretation: gr.Interpretation.update(None)
|
| 127 |
}
|
| 128 |
|
| 129 |
# XXX: Ideally we'd use the gr.load model, which uses the huggingface
|
|
|
|
| 147 |
|
| 148 |
file_widget.change(file_change_fn, file_widget, [col, fun_dropdown, all_dis_state])
|
| 149 |
|
| 150 |
+
fun_dropdown.change(function_change_fn, [fun_dropdown, all_dis_state], [disassembly, clazz, interpretation])
|
| 151 |
|
| 152 |
interpret_button.click(interpretation_function, disassembly, interpretation)
|
| 153 |
|