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

Pretrained model requires assets folder creation #2

Open
Querela opened this issue Feb 24, 2021 · 0 comments
Open

Pretrained model requires assets folder creation #2

Querela opened this issue Feb 24, 2021 · 0 comments

Comments

@Querela
Copy link

Querela commented Feb 24, 2021

bin/download_model
Downloading...
From: https://drive.google.com/uc?id=1V8itWtowCYnb2Bc9KlK9SxGff9WwmogA
To: /home/koerner/work/test/Deploy-BERT-for-Sentiment-Analysis-with-FastAPI/assets/model_state_dict.bin
Traceback (most recent call last):
  File "./bin/download_model", line 4, in <module>
    gdown.download(
  File "/home/koerner/work/test/Deploy-BERT-for-Sentiment-Analysis-with-FastAPI/venv/lib/python3.8/site-packages/gdown/download.py", line 153, in download
    f = open(tmp_file, "wb")
FileNotFoundError: [Errno 2] No such file or directory: 'assets/model_state_dict.bin09kxowvvtmp'

Solution, add this to the script, to just create the folder if it does not exist:

from pathlib import Path

Path("assets").mkdir(exist_ok=True)
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

1 participant