Skip to content

Commit

Permalink
eus
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Aug 13, 2024
1 parent c4ceb4e commit baeb193
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions models-hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@
import os
from remotemodels import RemoteModels


def main():
models = RemoteModels().get_list_of_models()
for model_url in models:
for language_pair in ["eng-cat", "cat-eng", "deu-cat", "cat-deu", "fra-cat", "cat-fra", "spa-cat", "cat-spa"]:
for language_pair in [
"eng-cat",
"cat-eng",
"deu-cat",
"cat-deu",
"fra-cat",
"cat-fra",
"spa-cat",
"cat-spa",
"eus-cat",
"cat-eus",
]:

if language_pair in model_url:
print(f"model: {model_url}")
PATH = (f"translate-{language_pair}")
PATH = f"translate-{language_pair}"
GIT_URL = f"https://huggingface.co/softcatala/{PATH}"
cmd = f'git clone {GIT_URL}'
cmd = f"git clone {GIT_URL}"
os.system(cmd)

ZIP_FILE = os.path.join(PATH, "model.zip")
Expand All @@ -28,5 +40,6 @@ def main():

os.remove(ZIP_FILE)


if __name__ == "__main__":
main()

0 comments on commit baeb193

Please sign in to comment.