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

HuggingFace Spaces Demo not working #951

Closed
Tracked by #967 ...
mattdeeperinsights opened this issue Jun 15, 2022 · 3 comments
Closed
Tracked by #967 ...

HuggingFace Spaces Demo not working #951

mattdeeperinsights opened this issue Jun 15, 2022 · 3 comments
Assignees
Labels
critical High priority ext: demo Related to demo folder type: bug Something isn't working

Comments

@mattdeeperinsights
Copy link

Bug description

Great work with the library!

I went onto your demo page on Huggingface but cannot run the demo on any document.

Code snippet to reproduce the bug

Upload a document here https://huggingface.co/spaces/mindee/doctr

Error traceback

PermissionError: [Errno 13] Permission denied: '/home/user/.cache/doctr'
Traceback:

File "/home/user/.local/lib/python3.8/site-packages/streamlit/script_runner.py", line 350, in _run_script
    exec(code, module.__dict__)
File "/home/user/app/app.py", line 113, in <module>
    main()
File "/home/user/app/app.py", line 80, in main
    predictor = ocr_predictor(det_arch, reco_arch, pretrained=True)
File "/home/user/app/src/python-doctr/doctr/models/zoo.py", line 87, in ocr_predictor
    return _predictor(
File "/home/user/app/src/python-doctr/doctr/models/zoo.py", line 28, in _predictor
    det_predictor = detection_predictor(
File "/home/user/app/src/python-doctr/doctr/models/detection/zoo.py", line 87, in detection_predictor
    return _predictor(arch, pretrained, assume_straight_pages, **kwargs)
File "/home/user/app/src/python-doctr/doctr/models/detection/zoo.py", line 46, in _predictor
    _model = detection.__dict__[arch](pretrained=pretrained, assume_straight_pages=assume_straight_pages)
File "/home/user/app/src/python-doctr/doctr/models/detection/differentiable_binarization/tensorflow.py", line 337, in db_resnet50
    return _db_resnet(
File "/home/user/app/src/python-doctr/doctr/models/detection/differentiable_binarization/tensorflow.py", line 280, in _db_resnet
    load_pretrained_params(model, _cfg['url'])
File "/home/user/app/src/python-doctr/doctr/models/utils/tensorflow.py", line 48, in load_pretrained_params
    archive_path = download_from_url(url, hash_prefix=hash_prefix, cache_subdir='models', **kwargs)
File "/home/user/app/src/python-doctr/doctr/utils/data.py", line 88, in download_from_url
    folder_path.mkdir(parents=True, exist_ok=True)
File "/usr/local/lib/python3.8/pathlib.py", line 1291, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
File "/usr/local/lib/python3.8/pathlib.py", line 1287, in mkdir
    self._accessor.mkdir(self, mode)

Environment

Firefox MacOS

Deep Learning backend

N/A

@mattdeeperinsights mattdeeperinsights added the type: bug Something isn't working label Jun 15, 2022
@frgfm frgfm added the ext: demo Related to demo folder label Jun 23, 2022
@frgfm frgfm self-assigned this Jun 23, 2022
@frgfm frgfm added the critical High priority label Jun 23, 2022
@frgfm frgfm added this to the 0.5.2 milestone Jun 23, 2022
@frgfm
Copy link
Collaborator

frgfm commented Jun 23, 2022

Hello @mattdeeperinsights 👋

Thanks for pointing it out!
I managed to reproduce this a minute ago on HF Spaces, but locally, I don't have any problem. I'll investigate with HF team to solve this shortly 👍

@frgfm
Copy link
Collaborator

frgfm commented Jun 23, 2022

@felixdittrich92
Copy link
Contributor

Fixed on HF side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical High priority ext: demo Related to demo folder type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants