Skip to content

Commit

Permalink
Merge pull request #919 from IAHispano/formatter/main
Browse files Browse the repository at this point in the history
chore(format): run black on main
  • Loading branch information
blaisewf authored Dec 22, 2024
2 parents 7e491c1 + 50d1e2b commit 908aa8c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
39 changes: 20 additions & 19 deletions tabs/extra/sections/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@

i18n = I18nAuto()


def processing_tab():
model_view_model_path = gr.Textbox(
label=i18n("Path to Model"),
info=i18n("Introduce the model pth path"),
value="",
interactive=True,
placeholder=i18n("Enter path to model"),
)
model_view_model_path = gr.Textbox(
label=i18n("Path to Model"),
info=i18n("Introduce the model pth path"),
value="",
interactive=True,
placeholder=i18n("Enter path to model"),
)

model_view_output_info = gr.Textbox(
label=i18n("Output Information"),
info=i18n("The output information will be displayed here."),
value="",
max_lines=11,
)
model_view_button = gr.Button(i18n("View"))
model_view_button.click(
fn=run_model_information_script,
inputs=[model_view_model_path],
outputs=[model_view_output_info],
)
model_view_output_info = gr.Textbox(
label=i18n("Output Information"),
info=i18n("The output information will be displayed here."),
value="",
max_lines=11,
)
model_view_button = gr.Button(i18n("View"))
model_view_button.click(
fn=run_model_information_script,
inputs=[model_view_model_path],
outputs=[model_view_output_info],
)
2 changes: 1 addition & 1 deletion tabs/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def get_indexes():

def extract_model_and_epoch(path):
base_name = os.path.basename(path)
match = re.match(r'(.+?)_(\d+)e_', base_name)
match = re.match(r"(.+?)_(\d+)e_", base_name)
if match:
model, epoch = match.groups()
return model, int(epoch)
Expand Down

0 comments on commit 908aa8c

Please sign in to comment.