red-agent-48266
05/15/2025, 5:28 PMtall-airline-16756
05/15/2025, 5:28 PMtall-airline-16756
05/15/2025, 5:28 PMdownload_files
method in the EOUPlugin
class to download the necessary model files from Hugging Face Hub. Here is an example:
def download_files(self):
from transformers import AutoTokenizer
from .base import _download_from_hf_hub
from .models import HG_MODEL, MODEL_REVISIONS, ONNX_FILENAME
for revision in MODEL_REVISIONS.values():
AutoTokenizer.from_pretrained(HG_MODEL, revision=revision)
_download_from_hf_hub(
HG_MODEL, ONNX_FILENAME, subfolder="onnx", revision=revision
)
_download_from_hf_hub(HG_MODEL, "languages.json", revision=revision)
To execute this, you can run:
python3 your_agent.py download-files
This method allows you to download and use the models locally without requiring API keys for inference. Let me know if you need further assistance!
Sources: Tree View: | dse-workbench | Tree View: | dse-workbenchred-agent-48266
05/15/2025, 5:29 PMtall-airline-16756
05/15/2025, 5:29 PMaxios
or node-fetch
to download files from Hugging Face Hub or similar sources.
If you need further assistance or specific guidance for Node.js, please let me know, and I can escalate this to a specialist for more detailed support.