Skip to content

please add huggingface args in unstructured.partition.xx functions #4209

@pjcc5

Description

@pjcc5

I use os.environ to make unstructured know that i need use diffrent huggingface endpoint ,but it didn't work.
my code is these:

os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"
os.environ["HF_HOME"] = "/workspace/huggingface_cache_dir"
os.environ["HF_HUB_DOWNLOAD_TIMEOUT"] = "300"
os.environ["HF_HUB_OFFLINE"] = "0"

elements = partition_image(
    filename="test_img.png",
    languages=["eng","chi_sim"],
    text_as_text=False,
    include_metadata=True,
)

It still going to huggingface to download models
but my network can't view the official huggingface web site

is there someone tell me how to make it right?
thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions