Skip to content

Commit

Permalink
fix embedder ui
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisewf committed Aug 20, 2024
1 parent 9a00d1c commit 2fd4643
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tabs/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,24 @@ def train_tab():
value="contentvec",
interactive=True,
)

with gr.Accordion(
i18n("Custom Embedder"), open=True, visible=False
) as embedder_custom:
embedder_upload_custom = gr.File(
label=i18n("Upload Custom Embedder"),
type="filepath",
interactive=True,
)
embedder_custom_refresh = gr.Button(i18n("Refresh"))
embedder_model_custom = gr.Dropdown(
label=i18n("Custom Embedder"),
info=i18n("Select the custom embedder to use for the conversion."),
choices=sorted(get_embedder_custom_list()),
interactive=True,
allow_custom_value=True,
)

hop_length = gr.Slider(
1,
512,
Expand Down Expand Up @@ -486,24 +504,6 @@ def train_tab():
interactive=False,
)

with gr.Column(visible=False) as embedder_custom:
with gr.Accordion(i18n("Custom Embedder"), open=True):
embedder_upload_custom = gr.File(
label=i18n("Upload Custom Embedder"),
type="filepath",
interactive=True,
)
embedder_custom_refresh = gr.Button(i18n("Refresh"))
embedder_model_custom = gr.Dropdown(
label=i18n("Custom Embedder"),
info=i18n(
"Select the custom embedder to use for the conversion."
),
choices=sorted(get_embedder_custom_list()),
interactive=True,
allow_custom_value=True,
)

extract_output_info = gr.Textbox(
label=i18n("Output Information"),
info=i18n("The output information will be displayed here."),
Expand Down

0 comments on commit 2fd4643

Please sign in to comment.