Spaces:
Runtime error
Runtime error
Edward J. Schwartz
commited on
Commit
·
c1aaef4
1
Parent(s):
d45c4d7
Revert "Try caching"
Browse filesThis reverts commit d45c4d736db68ac1254315e3a1c47060dc6a4eb4.
app.py
CHANGED
|
@@ -75,6 +75,12 @@ with gr.Blocks() as demo:
|
|
| 75 |
disassembly = gr.Textbox(label="Disassembly", lines=20)
|
| 76 |
clazz = gr.Label()
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
def file_change_fn(file):
|
| 79 |
|
| 80 |
if file is None:
|
|
@@ -102,14 +108,6 @@ with gr.Blocks() as demo:
|
|
| 102 |
clazz: gr.Label.update(top_k)
|
| 103 |
}
|
| 104 |
|
| 105 |
-
example_widget = gr.Examples(
|
| 106 |
-
examples=[f.path for f in os.scandir(os.path.join(os.path.dirname(__file__), "examples"))],
|
| 107 |
-
inputs=file_widget,
|
| 108 |
-
outputs=[col, fun_dropdown, all_dis_state],
|
| 109 |
-
fn=file_change_fn,
|
| 110 |
-
cache_examples=True
|
| 111 |
-
)
|
| 112 |
-
|
| 113 |
file_widget.change(file_change_fn, file_widget, [col, fun_dropdown, all_dis_state])
|
| 114 |
|
| 115 |
fun_dropdown.change(function_change_fn, [fun_dropdown, all_dis_state], [disassembly, clazz])
|
|
|
|
| 75 |
disassembly = gr.Textbox(label="Disassembly", lines=20)
|
| 76 |
clazz = gr.Label()
|
| 77 |
|
| 78 |
+
example_widget = gr.Examples(
|
| 79 |
+
examples=[f.path for f in os.scandir(os.path.join(os.path.dirname(__file__), "examples"))],
|
| 80 |
+
inputs=file_widget,
|
| 81 |
+
outputs=[all_dis_state, disassembly, clazz]
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
def file_change_fn(file):
|
| 85 |
|
| 86 |
if file is None:
|
|
|
|
| 108 |
clazz: gr.Label.update(top_k)
|
| 109 |
}
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
file_widget.change(file_change_fn, file_widget, [col, fun_dropdown, all_dis_state])
|
| 112 |
|
| 113 |
fun_dropdown.change(function_change_fn, [fun_dropdown, all_dis_state], [disassembly, clazz])
|