Skip to content

Commit

Permalink
Remove removeprefix to work with python version 3.8 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ptoupas committed Jan 10, 2025
1 parent 7295d96 commit 82a7044
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modelconverter/utils/hubai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ def is_hubai_available(model_slug: str) -> bool:
)

model_id = slug_to_id(
model_slug.removeprefix(f"{team_name}/").split(":")[0], "models"
(
model_slug[len(f"{team_name}/") :]
if model_slug.startswith(f"{team_name}/")
else model_slug
).split(":")[0],
"models",
)
model_variants = Request.get(
"modelVersions/", params={"model_id": model_id, "is_public": True}
Expand Down

0 comments on commit 82a7044

Please sign in to comment.