mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 11:39:18 +00:00
huggingface: fix community dep checking (#21628)
This commit is contained in:
@@ -33,7 +33,7 @@ class HuggingFacePipeline(BaseLLM):
|
||||
Example using from_model_id:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_community.llms import HuggingFacePipeline
|
||||
from langchain_huggingface import HuggingFacePipeline
|
||||
hf = HuggingFacePipeline.from_model_id(
|
||||
model_id="gpt2",
|
||||
task="text-generation",
|
||||
@@ -42,7 +42,7 @@ class HuggingFacePipeline(BaseLLM):
|
||||
Example passing pipeline in directly:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_community.llms import HuggingFacePipeline
|
||||
from langchain_huggingface import HuggingFacePipeline
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
||||
|
||||
model_id = "gpt2"
|
||||
|
Reference in New Issue
Block a user