fix(cv-import): bound source retention and guard worker recovery
This commit is contained in:
@@ -377,6 +377,9 @@ def main() -> int:
|
||||
data = Path(args.input).read_bytes()
|
||||
if args.mode == "document":
|
||||
os.environ.update({"HF_HUB_OFFLINE": "1", "HF_HUB_DISABLE_TELEMETRY": "1", "TRANSFORMERS_OFFLINE": "1"})
|
||||
# Cache trusted platform metadata before the document sandbox denies Linux uname.
|
||||
import platform
|
||||
platform.platform()
|
||||
sys.addaudithook(_deny_import_side_effects)
|
||||
result = extract_document(args.extension.lower(), data)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user