HuggingFaceHub()HuggingFaceHub models. ! This class is deprecated, you should use HuggingFaceEndpoint instead.
To use, you should have the huggingface_hub python package installed, and the
environment variable HUGGINGFACEHUB_API_TOKEN set with your API token, or pass
it as a named parameter to the constructor.
Supports text-generation, text2text-generation, conversational, translation,
and summarization.
Example:
.. code-block:: python
from langchain_community.llms import HuggingFaceHub hf = HuggingFaceHub(repo_id="gpt2", huggingfacehub_api_token="my-api-key")