-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
我用的Linux, 这是我git clone后的各种设置:
- 用python3.9创建venv (python3.9是conda的)
venv/bin/pip install -r requirements.txt
venv/bin/huggingface-cli login
运行 venv/bin/python main.py
后能看到UI窗口, 然后终端报下列错误, 程序结束
% venv/bin/python main.py
Traceback (most recent call last):
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/feature_extraction_utils.py", line 404, in get_feature_extractor_dict
resolved_feature_extractor_file = cached_path(
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/file_utils.py", line 1921, in cached_path
output_path = get_from_cache(
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/file_utils.py", line 2125, in get_from_cache
_raise_for_status(r)
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/file_utils.py", line 2052, in _raise_for_status
request.raise_for_status()
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/.%5Cmanga_ocr%5Cmodel/resolve/main/preprocessor_config.json
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/dev/ML/comic-translation/main.py", line 966, in config_read
self.change_mod(self.var.img_language)
File "/home/dev/ML/comic-translation/main.py", line 258, in change_mod
thread_language = threading.Thread(target=self.thread_language('ja'))
File "/home/dev/ML/comic-translation/main.py", line 273, in thread_language
self.memory.model = MangaOcr()
File "/home/dev/ML/comic-translation/manga_ocr/ocr.py", line 14, in __init__
self.feature_extractor = AutoFeatureExtractor.from_pretrained(pretrained_model_name_or_path)
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/models/auto/feature_extraction_auto.py", line 261, in from_pretrained
config_dict, _ = FeatureExtractionMixin.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/feature_extraction_utils.py", line 433, in get_feature_extractor_dict
raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co/' to load this model and it looks like .\manga_ocr\model is not the path to a directory conaining a preprocessor_config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
[1] 25063 IOT instruction (core dumped) venv/bin/python main.py
Metadata
Metadata
Assignees
Labels
No labels