Unstructured-IO / Unstructured-IO/unstructured

please add huggingface args in unstructured.partition.xx functions

Open
#4,209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
15.5k
Forks
1.3k
Avg merge
4d 2h
Merged PRs (30d)
13

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the partition_image example and trace the unstructured.partition.xx functions named in the request, then check how their model downloads currently receive configuration. Confirm the desired Hugging Face arguments and update the relevant function interfaces consistently; done means callers can control endpoint, cache, and timeout behavior without relying only on environment variables, with tests covering the new arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.