Skip to content

Commit

Permalink
cleanup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronfyfe committed Feb 19, 2024
1 parent e37457a commit 21f9c5c
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions model-pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,14 @@ let
# HuggingFace model packages
hf-model-packages =
foldl'
(acc: pkg: acc // (with pkg;
let
repoStr = replaceStrings [ "." ] [ "_" ] repo;
modelStr = replaceStrings [ "." ] [ "_" ] model;
in
{
"HF__${owner}__${repoStr}__${modelStr}" = fetchHuggingFaceModel {
inherit owner repo model;
commit = hf.${owner}.${repo}.commit;
hash = hf.${owner}.${repo}.models."${model}";
};
}
(acc: pkg: acc // (
let
repo-str = replaceStrings [ "." ] [ "_" ] pkg.repo;
model-str = replaceStrings [ "." ] [ "_" ] pkg.model;
in
{
"HF__${pkg.owner}__${repo-str}__${model-str}" = fetchHuggingFaceModel pkg;
}
))
{ }
hf-model-list;
Expand Down

0 comments on commit 21f9c5c

Please sign in to comment.