Spaces:
Running
on
Zero
Running
on
Zero
move model loading to first selection of image.
Browse files
app.py
CHANGED
@@ -198,6 +198,7 @@ PART_IMAGES_DICT = {file_name: load_part_images(file_name) for file_name in IMAG
|
|
198 |
|
199 |
# --- Gradio Functions ---
|
200 |
def update_selected_image(event: gr.SelectData):
|
|
|
201 |
image_height = 400
|
202 |
index = event.index
|
203 |
|
@@ -382,7 +383,6 @@ custom_css = """
|
|
382 |
|
383 |
# Define the Gradio interface
|
384 |
with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="PEEB") as demo:
|
385 |
-
initialize_model()
|
386 |
current_image = gr.State("")
|
387 |
current_predicted_class = gr.State("")
|
388 |
gt_class = gr.State("")
|
|
|
198 |
|
199 |
# --- Gradio Functions ---
|
200 |
def update_selected_image(event: gr.SelectData):
|
201 |
+
initialize_model()
|
202 |
image_height = 400
|
203 |
index = event.index
|
204 |
|
|
|
383 |
|
384 |
# Define the Gradio interface
|
385 |
with gr.Blocks(theme=gr.themes.Soft(), css=custom_css, title="PEEB") as demo:
|
|
|
386 |
current_image = gr.State("")
|
387 |
current_predicted_class = gr.State("")
|
388 |
gt_class = gr.State("")
|