Spaces:
Runtime error
Fix startup crash: OSError (dependency-conflict)
Hi! This Space currently fails to start on Hugging Face with:
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like obi/deid_roberta_i2b2 is not the path to a directory containing a file named config.json.
Cause. The rebuild fails before the app logic runs because the unpinned dependency stack resolves to incompatible httpx/httpcore versions; the decisive log line is TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options'. The lock date must be after robust-deid 0.3.1 was published, while still preserving the gradio 3.12-era dependency set.
Change. README.md, requirements.txt. requirements.txt is a lockfile resolved as of 2023-10-01 (Python 3.10), so the app runs on the library versions it was written for. python_version is pinned in the README to the interpreter we tested with. Nothing else is touched.
Tested. We rebuilt the Space with this patch the way Spaces builds it (README front-matter, requirements.txt, then the SDK), on 2 vCPU / 16 GB, like cpu-basic. The app started, and calling its predict endpoint returned:
[[['Patient ', None], ['John Smith', 'PATIENT'], [' (DOB ', None], ['03/04/1961', 'DATE'], [') was seen at ', None], ['Boston General Hospital', 'HOSPITAL'], [' on ', None], ['12/01/2021', 'DATE'], [' by Dr. ', None], ['Alice Wong', 'STAFF'], ['. Phone ', None], ['617-555-0123', 'PHONE'], ['.', None …
The diagnosis and patch were written by Beam (Reflection AI's open model) as part of Space Doctor, a Build with Beam challenge project that repairs broken Spaces and only proposes fixes that pass this check. We read the diff before opening this PR. Feel free to close it if you'd rather fix it another way.