Spaces:
Sleeping
Sleeping
debug: syntax error
Browse files
app.py
CHANGED
|
@@ -129,13 +129,15 @@ with gr.Blocks(css=custom_css) as interface:
|
|
| 129 |
|
| 130 |
|
| 131 |
# Multi-threaded processing
|
| 132 |
-
def run_both(sample_choice, uploaded_image, selected_models
|
| 133 |
results = []
|
| 134 |
netron_html = ""
|
| 135 |
|
| 136 |
# Thread to process the image
|
| 137 |
def process_thread():
|
| 138 |
nonlocal results
|
|
|
|
|
|
|
| 139 |
results = process_image(sample_choice, uploaded_image, selected_models, target_lyr = -5, n_components = 8)
|
| 140 |
|
| 141 |
# Thread to generate Netron visualization
|
|
@@ -157,11 +159,9 @@ with gr.Blocks(css=custom_css) as interface:
|
|
| 157 |
|
| 158 |
# Run button click
|
| 159 |
|
| 160 |
-
target_lyr = -5
|
| 161 |
-
n_components = 8
|
| 162 |
run_button.click(
|
| 163 |
fn=run_both,
|
| 164 |
-
inputs=[sample_selection, upload_image, selected_models
|
| 165 |
outputs=[result_gallery, netron_display, dff_gallery],
|
| 166 |
)
|
| 167 |
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
# Multi-threaded processing
|
| 132 |
+
def run_both(sample_choice, uploaded_image, selected_models):
|
| 133 |
results = []
|
| 134 |
netron_html = ""
|
| 135 |
|
| 136 |
# Thread to process the image
|
| 137 |
def process_thread():
|
| 138 |
nonlocal results
|
| 139 |
+
target_lyr = -5
|
| 140 |
+
n_components = 8
|
| 141 |
results = process_image(sample_choice, uploaded_image, selected_models, target_lyr = -5, n_components = 8)
|
| 142 |
|
| 143 |
# Thread to generate Netron visualization
|
|
|
|
| 159 |
|
| 160 |
# Run button click
|
| 161 |
|
|
|
|
|
|
|
| 162 |
run_button.click(
|
| 163 |
fn=run_both,
|
| 164 |
+
inputs=[sample_selection, upload_image, selected_models],
|
| 165 |
outputs=[result_gallery, netron_display, dff_gallery],
|
| 166 |
)
|
| 167 |
|