kiharalab / GO2Sum

GO2Sum is a deep learning based summarizer that generates human-readable summaries for GO term annotations made by protein function prediction methods.
GNU General Public License v3.0
10 stars 1 forks source link

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/models/functionCC/resolve/main/config.json #1

Open kad-ecoli opened 7 months ago

kad-ecoli commented 7 months ago
python3 main.py --input_file test1.tab --summary_type all --output_file example.tab
Global seed set to 42
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 773k/773k [00:00<00:00, 22.7MB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.32M/1.32M [00:00<00:00, 19.6MB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.18k/1.18k [00:00<00:00, 12.9MB/s]
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 850M/850M [00:27<00:00, 32.2MB/s]
Started generating Function CC on the dataset !
401 Client Error: Unauthorized for url: https://huggingface.co/models/functionCC/resolve/main/config.json
Traceback (most recent call last):
  File "/opt/py3/lib/python3.9/site-packages/transformers/configuration_utils.py", line 585, in _get_config_dict
    resolved_config_file = cached_path(
  File "/opt/py3/lib/python3.9/site-packages/transformers/file_utils.py", line 1846, in cached_path
    output_path = get_from_cache(
  File "/opt/py3/lib/python3.9/site-packages/transformers/file_utils.py", line 2050, in get_from_cache
    _raise_for_status(r)
  File "/opt/py3/lib/python3.9/site-packages/transformers/file_utils.py", line 1977, in _raise_for_status
    request.raise_for_status()
  File "/opt/py3/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/models/functionCC/resolve/main/config.json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/GO2Sum/main.py", line 29, in <module>
    function(df, output_file)
  File "/opt/GO2Sum/codes/model.py", line 34, in function
    modelFunc.load_model("t5",model_path, use_gpu=False)
  File "/opt/py3/lib/python3.9/site-packages/simplet5/simplet5.py", line 408, in load_model
    self.model = T5ForConditionalGeneration.from_pretrained(f"{model_dir}")
  File "/opt/py3/lib/python3.9/site-packages/transformers/modeling_utils.py", line 1268, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
  File "/opt/py3/lib/python3.9/site-packages/transformers/configuration_utils.py", line 510, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/opt/py3/lib/python3.9/site-packages/transformers/configuration_utils.py", line 537, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/opt/py3/lib/python3.9/site-packages/transformers/configuration_utils.py", line 618, in _get_config_dict
    raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co/' to load this model and it looks like models/functionCC is not the path to a directory conaining a 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'.

Looks like the huggingface model is not publicly available.

SwagarikaGiri commented 7 months ago

Can you please download the models from the repository given.

SwagarikaGiri commented 7 months ago

Hello , thank you so much for using our code. This is the link https://kiharalab.org/GO2Sum/ , can you please download it and unzip it to get the models. I hope that solves the issue