Skip to content

Commit

Permalink
Add field for selector
Browse files Browse the repository at this point in the history
  • Loading branch information
vorozhkog committed Sep 24, 2024
1 parent cf5ad18 commit 3e0eb91
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
PretrainedModelsSelector,
Checkbox,
Select,
Field,
)


Expand Down Expand Up @@ -47,12 +48,20 @@ def create_model_selector_widgets(
)
if "object detection" in pretrained_model_selector_task_types:
model_selector_sidebar_public_model_table.set_active_task_type("object detection")

# runtime selector
available_runtimes = ["PyTorch", "ONNXRuntime", "TensorRT"]
model_selector_runtime_selector_sidebar = Select(
[Select.Item(runtime, runtime) for runtime in available_runtimes]
)
model_selector_runtime_field = Field(
model_selector_runtime_selector_sidebar,
"Runtime",
"The model will be exported to the selected runtime for efficient inference (exporting to TensorRT may take about a minute).",
)

model_selector_sidebar_public_container = Container(
[model_selector_sidebar_public_model_table, model_selector_runtime_selector_sidebar]
[model_selector_sidebar_public_model_table, model_selector_runtime_field]
)
# ------------------------------

Expand Down

0 comments on commit 3e0eb91

Please sign in to comment.