copilot-swe-agent[bot]
matheus-rech
commited on
Commit
·
4fb1715
1
Parent(s):
155973f
Fix slider math domain error when model fails to load
Browse filesCo-authored-by: matheus-rech <71096630+matheus-rech@users.noreply.github.com>
app.py
CHANGED
|
@@ -3047,7 +3047,7 @@ with gr.Blocks() as demo:
|
|
| 3047 |
inputs=[files_input, subject_dropdown, text_input_batch, modality_dropdown_batch, window_dropdown_batch],
|
| 3048 |
outputs=[current_slice_output, slice_slider, status_batch_text, slice_info_text, subject_dropdown, subject_info_text]
|
| 3049 |
).then(
|
| 3050 |
-
lambda max_val: gr.Slider(maximum=max_val, interactive=True),
|
| 3051 |
inputs=[slice_slider],
|
| 3052 |
outputs=[slice_slider]
|
| 3053 |
)
|
|
|
|
| 3047 |
inputs=[files_input, subject_dropdown, text_input_batch, modality_dropdown_batch, window_dropdown_batch],
|
| 3048 |
outputs=[current_slice_output, slice_slider, status_batch_text, slice_info_text, subject_dropdown, subject_info_text]
|
| 3049 |
).then(
|
| 3050 |
+
lambda max_val: gr.Slider(maximum=max(max_val, 1), interactive=True),
|
| 3051 |
inputs=[slice_slider],
|
| 3052 |
outputs=[slice_slider]
|
| 3053 |
)
|