Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling offline huggingface model usage #325

Closed
cah-jake-bergren opened this issue Mar 5, 2024 · 1 comment
Closed

Enabling offline huggingface model usage #325

cah-jake-bergren opened this issue Mar 5, 2024 · 1 comment

Comments

@cah-jake-bergren
Copy link

cah-jake-bergren commented Mar 5, 2024

I'm working in an environment where calls to huggingface.co are blocked due to security concerns.

To init an OCR model for a call to partition_pdf in this environment, I can stage the model weights locally and set environment variables to properly utilize that model via init params and the model_path param. The problem is that when I include the label_map as required in that json, the keys of the label_map are converted to strings on-load when they need to be ints.

Can model init param JSON values be validated on-load via something like pydantic? That way this issue is avoided and custom init param values are not broken due to JSON serialization and deserialization.

Alternatively, you could allow me to pass the model_path param only.

@cah-jake-bergren cah-jake-bergren changed the title Enabling local hosting of huggingface weights Enabling offline huggingface model usage Mar 5, 2024
@fwenyin
Copy link

fwenyin commented Apr 30, 2024

hi i am also facing this issue, are there any workarounds for this? i have downloaded the model unstructuredio/yolo_x_layout locally, but it is not calling the local model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants